Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Lord_Cheap said:
A simple question really, but what should I remove so that when a player picks a banner, the lord that already has the banner still keeps it, and not switch to another one? Thanks :smile:
You'll find this in module_presentations, the presentation "banner_selection", this bit of code:
Code:
          (assign, ":troop_to_change", 0),
          (assign, ":end_cond", active_npcs_end),
          (try_for_range, ":cur_troop", active_npcs_begin, ":end_cond"),
            (troop_slot_eq, ":cur_troop", slot_troop_banner_scene_prop, ":selected_banner_spr"),
            (assign, ":troop_to_change", ":cur_troop"),
            (assign, ":end_cond", 0),
            (troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_one),
            (troop_get_slot, ":cur_party", ":cur_troop", slot_troop_leaded_party),
            (gt, ":cur_party", 0),
            (party_set_banner_icon, ":cur_party", banner_map_icons_end_minus_one),             
          (try_end),
          (try_for_range, ":cur_center", walled_centers_begin, walled_centers_end),
            (try_begin),
              (party_slot_eq, ":cur_center", slot_town_lord, "trp_player"),
              (party_set_banner_icon, ":cur_center", ":selected_banner_map_icon"),
            (else_try),
              (party_slot_eq, ":cur_center", slot_town_lord, ":troop_to_change"),
              (party_set_banner_icon, ":cur_center", banner_map_icons_end_minus_one), 
            (try_end),
          (try_end),
        (try_end),
 
Ikaguia said:
use notepad++ go to the last bracket and then press cntrl+b(go to matching brace)

You legend, thankyou. The vanilla matched it to the top but my mod was matched to a bracket at a part of my work and I found some missing brackets in that section. I have new errors now but I take it that to mean the baffling one is over.
 
What script calculate experience for the killed enemies?
I used "agent_fade_out" for some player actions, but player got no experience. I need that it would be like a killing, thats why I need calculate exp for a killing.
And maybe there is some one else way to get experience by using some operation?
 
mb6.jpg


The grid...

banners.jpg

Using the Banner and Flag Standardization Pack. This problem arises even when using the pre-set Native banner templates, already arranged into the grid. I suspect it is an error on my part, any clue?
 
Gulard said:
What script calculate experience for the killed enemies?
I used "agent_fade_out" for some player actions, but player got no experience. I need that it would be like a killing, thats why I need calculate exp for a killing.
And maybe there is some one else way to get experience by using some operation?
(agent_deliver_damage_to_agent,<agent_id_deliverer>,<agent_id>,<value>),

should do it.
 
I am using ms 1.134
My question is regarding operation store_random_in_range

I was generating a random no. between 3000 and 5000 and then assigning it to a custom slot. But everytime I started the game it generated number around 1000. Then I tried the range of 300 to 500 and multiplied it with 10, then saved to slot and it worked correctly.
So is there some limit regarding this operation.
 
Caba`drin said:
(agent_deliver_damage_to_agent,<agent_id_deliverer>,<agent_id>,<value>),

should do it.
oh... I knew that you would say this! But it is not compatible with "fade_out". Agent can't to fade out and to die at the same time... And it can't first to die and then to fade out and on the contrary. Agent or only dies or only fades out.
Unfortunately there is no operation like "agent_kill_by_agent". That would be cool if it would be...  :cry:
And also there is no operation to add kill to total player kills, only for store it  :cry:
It seems that there is no way to make a real kill of a 'fade_out'.
 
MadocComadrin said:
How does the AI take into account tree/rocks generated with the terrain?

In a scene? They don't unless you AI Mesh the objects in.

A properly AI meshed map can make your enemies seem much smarter than they really are. :smile:
 
Gulard said:
oh... I knew that you would say this! But it is not compatible with "fade_out". Agent can't to fade out and to die at the same time... And it can't first to die and then to fade out and on the contrary. Agent or only dies or only fades out.
Unfortunately there is no operation like "agent_kill_by_agent". That would be cool if it would be...  :cry:
And also there is no operation to add kill to total player kills, only for store it  :cry:
It seems that there is no way to make a real kill of a 'fade_out'.
agent_deliver_damage_to_agent will definitely count as a kill if you set the target hp to 0 beforehand.
 
Ikaguia said:
do I have to triangulate all models or only the scene props? I was making a throwable weapon and it got too high poly triangulated, even the lod.
Yes, to get anything working in game it need to be triangulated. Also, unless you're expecting hundreds of instances on screen at the same time, you're okay with very high poly models for simple testing (proving yourself you can get it in-game and the like).
 
Somebody said:
agent_deliver_damage_to_agent will definitely count as a kill if you set the target hp to 0 beforehand.
The main thing - the visual effect. If the agent dies, he 'falls dead', if it fades out, it can not 'falls dead'.
After the operatoin 'fade out' the agent is removed from the battlefield and it is impossible to do any operations with him... Thats why I can't kill agent by 'agent_deliver_damage_to_agent'...
 
Lumos said:
I'm osrry, but I thought you wanted to kill the agent? If you want a kill, then you don't need to fade_out.
I need that agent disappear (fade out) just before death. I need only 'disappearing' effect... It is wonderful affect for the ghost... and other 'undead'.
 
I think there's no calculate experience script in the module system. It's probably hardcoded. I assume it is the level of the troop multiplied by some constant (maybe with a constant offset), you could do some tests and if you are lucky you might be able to tell how it is generated.
 
Highlander, doubts about the constant. I try used '9', but got 54 instead of 50 exp for looters (ie more), but when I used '10' I got 244 instead of 250 for knights (ie less) despite the fact that I used larger multiplier. I mean it depends on  some function, not constant.
I can live with that... But there is some one else, which change after kill, like total kill count for player. And it I can't change! If player would kill all enemies by special ways like way with fade-out-effect he would get no kills to count...
 
Status
Not open for further replies.
Back
Top Bottom