Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Bayard-X said:
The CanFail architecture seems interesting to me, but I seem to lack the knowledge in how to make the script then.

However, even in the current state, I am happy, because I can now do some intersting things on the ReMo.

The cf version would look like this (and would work like a normal conditional operation...if it passes, the code continues, if not it stops):
Code:
("cf_check_if_one_or_more_of_these_are_factors",
   [
         (store_script_param, ":number_to_check", 1), # I want to know of this number if the following are factors.
         (store_script_param, ":number_of_loops", 2), # run loops
         (assign, ":factors_bool",0), # initialise boolean to return
         (val_add, ":number_of_loops", 3),
         (try_for_range, ":i", 3, ":number_of_loops"),           
             (store_script_param, ":this_factor", ":i"),
             (store_mod, ":check", ":number_to_check", ":this_factor"),
             (eq, ":check", 0),
             (assign, ":factors_bool",1),
             (assign, ":number_of_loops", ":i"),           
          (try_end),
          (eq, ":factors_bool", 1),         
   ]),
 
Question/s:
What exactly is the purpose of kingdom_reinforcement party templates? And what happens if your troop tree exceeds the maximum amount of slots in this?
Thank you in advance
 
Crossbow Joe said:
Question/s:
What exactly is the purpose of kingdom_reinforcement party templates? And what happens if your troop tree exceeds the maximum amount of slots in this?
Thank you in advance
The reinforcement party templates are what NPC lords and walled centers use to reinforce their parties/hire more troops. A simple trigger calls one or two different scripts that adds these party templates to the currently active lord parties and walled center parties.

I don't know that I necessarily understand your second question. If you have more reinforcement party templates that you haven't stored in faction slots, then they aren't going to be used by the reinforcement scripts...I don't think they'll be used at all, unless you've edited the cf_reinforce_party script, for instance.
 
Caba`drin said:
Crossbow Joe said:
Question/s:
What exactly is the purpose of kingdom_reinforcement party templates? And what happens if your troop tree exceeds the maximum amount of slots in this?
Thank you in advance
The reinforcement party templates are what NPC lords and walled centers use to reinforce their parties/hire more troops. A simple trigger calls one or two different scripts that adds these party templates to the currently active lord parties and walled center parties.

I don't know that I necessarily understand your second question. If you have more reinforcement party templates that you haven't stored in faction slots, then they aren't going to be used by the reinforcement scripts...I don't think they'll be used at all, unless you've edited the cf_reinforce_party script, for instance.
Well I mean there are six "slots" in the three parties which make up a total of 18. I have a troop tree with 25 troops, are you saying that I can add extra parties and simply reference them in this cf_reinforce_party script?
 
Crossbow Joe said:
Well I mean there are six "slots" in the three parties which make up a total of 18. I have a troop tree with 25 troops, are you saying that I can add extra parties and simply reference them in this cf_reinforce_party script?
Ah, understood, sorry.
Yes, you can create new party templates in module_party_templates. For easiest insurance that they'll be used correctly, define a new slot_faction_reinforcements_YOURLETTER slot and populate it in the script "initialize_faction_troop_types" with the others and call it in the appropriate reinforcement scripts. A quick search for slot_faction_reinforcements_a in module_scripts will show you the places you need to edit (not many, and other than declaring the slot in constants and creating the new template(s), that's the only file that needs editing).
 
Speaking of party templates, I remember you saying you can make parties based off them in action mode, but can you do the same in multiplayer? I'm working on an OO-esque framework.
 
Uhm... I have a question.

What happens if I change "player_troop" stats / skill / attributes with WSE during the game, it will be possible to make "personal" troops without define them in module_troops.py?

Thanks :smile:
 
CTCCoco said:
What happens if I change "player_troop" stats / skill / attributes with WSE during the game, it will be possible to make "personal" troops without define them in module_troops.py?
If I understand you correctly, no, you'll need separate troop templates as every party in the game uses the same troop templates to create its agents. If you change trp_swadian_knight, you'll change its stats for the NPC parties, too.
 
Caba`drin said:
CTCCoco said:
What happens if I change "player_troop" stats / skill / attributes with WSE during the game, it will be possible to make "personal" troops without define them in module_troops.py?
If I understand you correctly, no, you'll need separate troop templates as every party in the game uses the same troop templates to create its agents. If you change trp_swadian_knight, you'll change its stats for the NPC parties, too.
So there is no way to use some functions to "make" personal troops. Ok. So...

In cRPG you can change all your attributes / skills... this means that they had defined EVERY troop? I think it's crazy (there's too many possibilities), but how they did that without define their troops?

Thanks again, master :razz:

Note that I'm talking about multiplayer, I'm doing a RPG Module.
 
Some body know the code in mod POP, It allow player choose : take a special weapon or take money when he defeat the king. I need this code,please help
 
Caba`drin said:
CTCCoco said:
MadocComadrin said:
~255 troops isn't all that bad when you have a script to define their stats dynamically.
What? 255 troops isn't enough to include all these possibilities :neutral:
Since you are creating the troop stats dynamically, you don't need a troop for each possibility. You only need a troop for each player on the server. Thus, ~255 troops.

That was I was asking about... if it's possible. Well, lol.

Wait... I get that... 255 troops, right hehe.
 
Status
Not open for further replies.
Back
Top Bottom