Prophesy of Pendor Dev Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Forum for the Development Team associated with the Mount&Blade Module Prophesy of Pendor Development
 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

 

 Enlarging Parties

Go down 
5 posters
AuthorMessage
Mordred
Insidious Diety
Insidious Diety
Mordred


Posts : 2523
Join date : 2009-07-17

Enlarging Parties Empty
PostSubject: Enlarging Parties   Enlarging Parties EmptyFri Jul 01, 2011 8:24 am

I know that Timaaagh came across a problem which should only really be a problem for the Snake Cult, and that is that there is a limit of 6 troops for each party that spawns. Now, because we are essentially rolling three troop trees into this spawn this causes us problems. Now I know from PoP3 that there is a script which adds additional troops to a spawn, what I do not know is just how this works and how it is triggered.

Ideally I would like to have the new party spawn and immediately call the script to add in more troops. Is this possible? Is it much work? Will it strain the system? If it is unfeasable, what other solutions can you offer me?
Back to top Go down
ManOfHonor
Insidious Provocateur
Insidious Provocateur



Posts : 67
Join date : 2011-06-04
Location : Yokosuka, Japan

Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties EmptyFri Jul 01, 2011 7:35 pm

It seems this should not be difficult, as a test I've got a snake cult party with 30 ashenborn principalities (in addition to it's normal troops) wandering around my map now. I know how to add a set or random number of troops to the spawned parties/warbands/armies now, though scaling it will take a bit more doing (I am unsure of that bit, am searching for the code relating to it)
simply added
(assign, ":new_party", reg0),
(party_add_members, ":new_party", "trp_p4_ashenborn_principale", 30),
to the spawn cult party bit



As soon as I can find the code relating to triggering lord spawns, and to the party size scaling, it should be easy. Anyone know where that code is hiding? I'm not having any luck finding it....



Ok, found the lord spawn code, looks doable, but I'm about out of time for now, will test later.
Back to top Go down
Mordred
Insidious Diety
Insidious Diety
Mordred


Posts : 2523
Join date : 2009-07-17

Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties EmptyFri Jul 01, 2011 8:31 pm

Superb! Could you liaise with Timaaagh so that he can use it for implementing his Snake parties.

If you are unable to scale, then use the code to add the small numbered units (ie Snake Priestesses), and then the regular scaling for the ordinary troops (as their numbers will vary far more)
Back to top Go down
Timaaagh
Thought Warden
Thought Warden
Timaaagh


Posts : 143
Join date : 2010-06-08
Location : Muskegon, Michigan

Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties EmptyFri Jul 01, 2011 10:31 pm

Ah excellent! I haven't checked out the script yet, but since it's already there it souldn't take much time at all to implement. Now we just need to know which lords are going to have which enclave units.
Back to top Go down
ManOfHonor
Insidious Provocateur
Insidious Provocateur



Posts : 67
Join date : 2011-06-04
Location : Yokosuka, Japan

Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties EmptySat Jul 02, 2011 5:17 am

As of now I've got a working system that adds some unique troops slots to the constants, at the individual lord unique troop assignment in module_scripts starting at 1221, and at 21707 at the lord spawn special unit scripts where the unique troops slots are utilized.

I still haven't found any preexisting scaling script though I could whip up some basic stuff something along the lines of if player level is this add this many troops, and that would depend on how much scaling we want


For example heres what mine looks like (huge numbers for testing, hehehe, and just grabbed random snake units)

for snake lord 1,
(troop_set_slot,"trp_knight_1_1", slot_troop_special_troop_to_train, "trp_p4_snake_cobra_venomblade"),
(troop_set_slot,"trp_knight_1_1", slot_troop_special_range_begin, 400),
(troop_set_slot,"trp_knight_1_1", slot_troop_special_range_end, 700),
(troop_set_slot,"trp_knight_1_1", slot_troop_special2_troop_to_train, "trp_p4_snake_viper_shadow"),
(troop_set_slot,"trp_knight_1_1", slot_troop_special2_range_begin, 400),
(troop_set_slot,"trp_knight_1_1", slot_troop_special2_range_end, 700),
(troop_set_slot,"trp_knight_1_1", slot_troop_special3_troop_to_train, "trp_p4_snake_viper_errant"),
(troop_set_slot,"trp_knight_1_1", slot_troop_special3_range_begin, 400),
(troop_set_slot,"trp_knight_1_1", slot_troop_special3_range_end, 700),

at the spawn script I just copied and pasted the relevant bit and changed the slot numbers, though I think a few of the lines can be cut for optimization, will test that sometime.

I'd say that 3 or 4 unique troop slots should do it, and then, in the spawning script just add in a few operations like add 5 to the first special troop per 5 player levels, but add 10 for the second one, or it can be more complex, but I'd need specifics on how much scaling for which troop. In either case the 1st/2nd/et cetra slots should be maintained as the same type of troop- so if the first can always be priestesses, then our little scaling code will always be adding the correct number priestesses, instead of a ton of them like the second slot. And that second slot should- well, ok I think you get the picture.
Back to top Go down
Mordred
Insidious Diety
Insidious Diety
Mordred


Posts : 2523
Join date : 2009-07-17

Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties EmptySat Jul 02, 2011 6:05 am

Can I leave this in your and Timaaagh's hands? Timaaaagh is doing all the party templates I believe, so will have the best idea on how to scale things.
Back to top Go down
MadVader
Nemisis
Nemisis
MadVader


Posts : 1063
Join date : 2010-03-01
Location : Ljubljana, Slovenia

Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties EmptySat Jul 02, 2011 11:57 am

Dudes, just add another party template after you create a party, like this:
(spawn_around_party,":somewhere","pt_first_part"),
(assign, ":result", reg0),
(party_add_template, ":result", "pt_second_part"),

No manual scaling, no slots, and you have 12 troop types instead of 6 (=the original problem). When stuck like this, best ask Treebeard or the Forge.
Hopefully this is what you were looking for, and good luck with your efforts.
Back to top Go down
mp84
Nemisis
Nemisis



Posts : 690
Join date : 2010-12-21
Age : 42
Location : New Jersey

Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties EmptySat Jul 02, 2011 1:15 pm

Ahh, Knowledge from the "Dark Side" is always helpful! Wink

thanks MV as usual.

regards,

MP
Back to top Go down
Timaaagh
Thought Warden
Thought Warden
Timaaagh


Posts : 143
Join date : 2010-06-08
Location : Muskegon, Michigan

Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties EmptySat Jul 02, 2011 1:17 pm

Thanks MV!
Back to top Go down
Mordred
Insidious Diety
Insidious Diety
Mordred


Posts : 2523
Join date : 2009-07-17

Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties EmptySat Jul 02, 2011 1:47 pm

Even better! Thanks MV.
Back to top Go down
ManOfHonor
Insidious Provocateur
Insidious Provocateur



Posts : 67
Join date : 2011-06-04
Location : Yokosuka, Japan

Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties EmptySat Jul 02, 2011 5:54 pm

Alright, cool, thanks MV.

Ok, I think the best way to do this is using MV's template advice within the special troops code therefore we can assign an enclave template to each lord individually without having to do any try for range if then to differentiate between which lord gets which enclave. We can even, if we're feeling frisky, re utilize some more original code, the % chance for reinforcements from one of the templates, and have multiple templates for each enclave to throw some more variance into the spawns.
Back to top Go down
ManOfHonor
Insidious Provocateur
Insidious Provocateur



Posts : 67
Join date : 2011-06-04
Location : Yokosuka, Japan

Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties EmptySat Jul 02, 2011 7:00 pm

Ok, I'm not having any luck actually getting the extra templates to spawn...
Here's Aziza's special troops block
Code:

(troop_set_slot,"trp_knight_1_1",  slot_troop_special_troop_to_train, "trp_p4_snake_dom_armored_bowman"),
  (troop_set_slot,"trp_knight_1_1",  slot_troop_special_range_begin, 4),
  (troop_set_slot,"trp_knight_1_1",  slot_troop_special_range_end, 7),
  (troop_set_slot,"trp_knight_1_1",  slot_snake_enclave_s, "pt_kingdom_1_enclave_a_s"),
  (troop_set_slot,"trp_knight_1_1",  slot_snake_enclave_m, "pt_kingdom_1_enclave_a_m"),
  (troop_set_slot,"trp_knight_1_1",  slot_snake_enclave_l, "pt_kingdom_1_enclave_a_l"),

Those templates (as well as a b sml and c sml) were added to party templates, really just copies of the a template with s m l being the size/toughness/composition (or they will be, right now they're just set up to be identifiers, one has a hundred of this, another a hundred of that)
Those slots were added to constants right below the special troop constants

Here is the code in the special troops spawning bit that I added in, I'm not sure why they aren't spawning
Code:
(try_begin), #three
              (party_stack_get_troop_id, ":leader", ":party_no"),
           (party_get_slot, ":snake_enclave_s", ":leader", slot_snake_enclave_s),
              (party_get_slot, ":snake_enclave_m", ":leader", slot_snake_enclave_m),
              (party_get_slot, ":snake_enclave_l", ":leader", slot_snake_enclave_l),
           (store_random_in_range, ":rand", 0, 100),
              (try_begin),
                (lt, ":rand", 30),
                (party_add_template, ":party_no", ":snake_enclave_s"),
              (else_try),
                (lt, ":rand", 60),
                (party_add_template, ":party_no", ":snake_enclave_m"),
              (else_try),
                (party_add_template, ":party_no", ":snake_enclave_l"),
                (try_end),       
          (try_end),

The normal special troops (code continues right after that try_end) spawn just fine
Back to top Go down
Timaaagh
Thought Warden
Thought Warden
Timaaagh


Posts : 143
Join date : 2010-06-08
Location : Muskegon, Michigan

Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties EmptySat Jul 02, 2011 10:19 pm

Hmm my first question is that I don't see where the variables ":leader", ":party_no", ":snake_enclave_s", ":snake_enclave_m", and ":snake_enclave_l", are assigned anything.
Back to top Go down
MadVader
Nemisis
Nemisis
MadVader


Posts : 1063
Join date : 2010-03-01
Location : Ljubljana, Slovenia

Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties EmptySat Jul 02, 2011 11:47 pm

Instead of:
(party_get_slot, ":snake_enclave_l", ":leader", slot_snake_enclave_l),
you should be doing:
(troop_get_slot, ":snake_enclave_l", ":leader", slot_snake_enclave_l),

I see no reason in using slots or variables, though, as your templates are constants, so you may want to do this:
(store_random_in_range, ":rand", 0, 100),
(try_begin),
(lt, ":rand", 30),
(party_add_template, ":party_no", "pt_snake_enclave_s"),
(else_try),
(lt, ":rand", 60),
(party_add_template, ":party_no", "pt_snake_enclave_m"),
(else_try),
(party_add_template, ":party_no", "pt_snake_enclave_l"),
(try_end),

Unless you want different SE templates for every lord.
If these are not to be used for lord parties, but other spawns, then don't do this in script_cf_reinforce_party (used for lords and garrisons), but find a nice place in one of the script_spawn_* scripts where they should be created.
Back to top Go down
ManOfHonor
Insidious Provocateur
Insidious Provocateur



Posts : 67
Join date : 2011-06-04
Location : Yokosuka, Japan

Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties EmptySun Jul 03, 2011 1:43 am

Timaaagh- leader and party_no were defined earlier in a part of the code that I did not change, and the sml locals are in the second code block there (I believe)

MV- Many thanks, that party/troop is what was stopping it from working.

I don't know about what the design team has as an intention, but I am setting up a system to support any type of conclave variance that they may wish, capable of supporting a different template for each lord if they desire. Or as now each lord having three options for their enclave troop composition. If they want something that does not require this all, then I'll simplify it, but I'd rather have a nice shiny working option for them already. Now all I really need are the specifics as to what lord should get how many of what troop and all and it's done.


Though I will probably move where my added code to the lord spawn bit, as the special units addition code is not affecting the initial spawn when the game starts, though this may be desirable if we don't want the snakes to be quite as powerful on day one.
Moved code and slightly changed it so that it is now in the lord spawn bit, so now the snakes will start the game with their conclave troops as well.


*slaughters Aziza again*
Hehehe, yes my lab rat, spawn with different compositions, mwuhahaha.

This whole slaughtering thing is wayyy too easy when all the snakes have like no gear though -_-
Back to top Go down
mp84
Nemisis
Nemisis



Posts : 690
Join date : 2010-12-21
Age : 42
Location : New Jersey

Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties EmptySun Jul 03, 2011 3:26 am

Guys,

While the technical terms of codding is out of my hands, nevertheless, just a gentle reminder that to make sure you're able to successfully compile the code before uploading up to the SVN site, as about a week and 1/2 ago we had to clean up code for the Alpha since it wasn't compiled correctly..

So we always want to make sure what you do is not only tested in-game, but compiled correctly before the changes are committed back to our SVN site.

regards,

MP
Back to top Go down
ManOfHonor
Insidious Provocateur
Insidious Provocateur



Posts : 67
Join date : 2011-06-04
Location : Yokosuka, Japan

Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties EmptySun Jul 03, 2011 3:48 am

I've compiled so many times I want to add the build_module.bat to my shortcut bar. Damn you vista 7.
Back to top Go down
Sponsored content





Enlarging Parties Empty
PostSubject: Re: Enlarging Parties   Enlarging Parties Empty

Back to top Go down
 
Enlarging Parties
Back to top 
Page 1 of 1
 Similar topics
-
» snake cult parties

Permissions in this forum:You cannot reply to topics in this forum
Prophesy of Pendor Dev Forum :: Siege Workshop-
Jump to: