Monster Respawn rate and leveling

Tall, not Wide

By on August 19, 2013 7:34:40 AM from Elemental Forums Elemental Forums

Valakov

Join Date 03/2006
0

Good Morning,

 

First off - top drawer work on LH Stardock, have been a fan since GC1, still go back to 2 when i get the 4x itch. longest running game burned into my hard drive(s) - still remember when you all were based down the street from my house (wait, was it troy or sterling heights? madison? oy getting old)

 

have ran a few games of LH now, and am starting to get the modding itch, nothing special, just a few tweaks - the first i did was to remove the divide exp, loaded up a gigantic map (13x10, mod) set it all to dense, and found my starting to show its age first gen i7 and the AI had a bit of a difficulty cutting through the settings.

the other issue that i should have recognized at the start is that after a while, the champions (including the SOV's), become powerhouses- while the monsters eventually get outclassed in level.

 

what i would like to do seems simple, but those usually end up being the most complicated.

how does one increase the rate at which lairs spawn new mobs? - i plan on running with lower total lair counts in the next play through (normal or sparse setting) but would like these to create more monsters per.

and

how would one then go about giving those mobs spawned more levels (and stats therefore?) based on either total turn count, or ideally, turn count alive?

know there is an event that increases mob level by 2 in the xml, is it possible to just make that recurring without blocking other events from occurring?

 

any help at all pointing to the pertinent xml files/code would be much obliged, most of my modding experience however is of the cut and paste variety, as opposed to writing it up fresh. please be gentle.

 

 

Locked Post 20 Replies
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
August 19, 2013 7:53:28 AM from Elemental Forums Elemental Forums

You could write your own quests (aka random events) that jack up monster levels, set to occur and self-complete at set turn counts.

Or, check the goodie huts - they are set  to upgrade after a set number of turns. You could add higher tier goodie huts with horrible stacks of doom for later game.

Or, random events that drop goodie huts, see the "world gets more dangerous" quests (events)

Reason for Karma (Optional)
Successfully updated karma reason!
August 19, 2013 8:12:50 AM from Elemental Forums Elemental Forums

amazingly fast reply, thanks

 

do see that the Eclipse (world gets more dangerous) event/quest is set to <Repeatable>0</Repeatable> - so i am going on the assumption i could set it to 1, but worried it will just zap the chance of other quests triggering. know there is another one that spawns higher level mobs/named later in turn count as well, but cant remember the name for the life of me.

 

if i take the plunge and write my own, would a quick and dirty copy paste of the original work? (edit- more i look at it, the answer looks like no, no likely hood or multiple turn options along with no idea what some of the code actually does, spawn rating etc)  and how would one go about setting the every x turn re-occur?

 edit -code that confuses me

<SpawnRating>1</SpawnRating>
<TriggerChance>3000</TriggerChance>
<PostTriggerChance>14</PostTriggerChance>

would rather not have the event happen tooo often lol.

ill take a peek at huts for inspiration

Reason for Karma (Optional)
Successfully updated karma reason!
August 19, 2013 10:01:55 AM from Elemental Forums Elemental Forums

Oh. Could we maybe set Eclipse to happen regularly? I need to look into that. Also if I am not mistaken there is a mod that increases monster power throughout the game somewhere.

Reason for Karma (Optional)
Successfully updated karma reason!
August 20, 2013 2:25:47 AM from Elemental Forums Elemental Forums


ah, the wonderful world of working midnights.

after looking at the code.. and stil not understanding it, i think what i might do is just copy the eclipse, rename to 1,2,3 etc and set new turns for each iteration. going that route will also allow for differant level boosts at later turns etc. - will also copy the mob type lines and add in the other monster factions.

still though, how do i "force" the event to happen, as oppposed to a random chance after turn X? time to search

 

 

Reason for Karma (Optional)
Successfully updated karma reason!
August 20, 2013 5:11:33 AM from Elemental Forums Elemental Forums

set the 'probabilty' of the quest spawning to a small number (from what I remember from the forum itis higher numbers = less likely)

harpo

 

Reason for Karma (Optional)
Successfully updated karma reason!
August 20, 2013 7:47:49 AM from Elemental Forums Elemental Forums

Quoting Valakov,


ah, the wonderful world of working midnights.

after looking at the code.. and stil not understanding it, i think what i might do is just copy the eclipse, rename to 1,2,3 etc and set new turns for each iteration. going that route will also allow for differant level boosts at later turns etc. - will also copy the mob type lines and add in the other monster factions.

still though, how do i "force" the event to happen, as oppposed to a random chance after turn X? time to search

 

Remove the 'chance to trigger' tag, and it becomes 100%.

Smaller numbers are less likely, larger more likely. It's a fraction calculation, denominator is defined by random event chance and the values in Elementaldefs.xml

Reason for Karma (Optional)
Successfully updated karma reason!
August 20, 2013 8:06:41 AM from Elemental Forums Elemental Forums

Quoting davrovana,



Remove the 'chance to trigger' tag, and it becomes 100%.

Smaller numbers are less likely, larger more likely. It's a fraction calculation, denominator is defined by random event chance and the values in Elementaldefs.xml

 

awesome info, thanks so much. going to start writing it up on me next day off. (or when i finish the current game i am on perhaps)

 

On to respawn / more spawns less camps

elemental Def file has the following

<WorldSpawnRatingIncrementFormula_Dividee>1.0</WorldSpawnRatingIncrementFormula_Dividee>
<WorldSpawnRatingIncrementFormula_DivisorDivisor>4.0</WorldSpawnRatingIncrementFormula_DivisorDivisor>
<MonsterSpawnRateIncrease>45</MonsterSpawnRateIncrease>

monster spawn rate increase would be what would affect all camps? or the creation of new ones?

 

otherwise it will be alot of notepad++ edits lol

 

Reason for Karma (Optional)
Successfully updated karma reason!
August 20, 2013 8:46:31 AM from Elemental Forums Elemental Forums

Quoting Valakov,


elemental Def file has the following

<WorldSpawnRatingIncrementFormula_Dividee>1.0</WorldSpawnRatingIncrementFormula_Dividee>
<WorldSpawnRatingIncrementFormula_DivisorDivisor>4.0</WorldSpawnRatingIncrementFormula_DivisorDivisor>
<MonsterSpawnRateIncrease>45</MonsterSpawnRateIncrease>

monster spawn rate increase would be what would affect all camps? or the creation of new ones?

otherwise it will be alot of notepad++ edits lol

 

Don't know what those lines do. I don't think new goodie huts spawn outside random events.

If you check out CoreGoodieHuts.xml you'll see lines like this in some huts (this is from I think the 2nd tier butcherman lair):

        <UpgradesToGoodieHut>Lair_ButchermanHecatomb</UpgradesToGoodieHut>
        <UpgradesToGoodieHutInTurns>140</UpgradesToGoodieHutInTurns>

Try creating a series of goodie huts (copy and paste away), that spawn at start with the standard huts, but can upgrade to whatever horrible, high level stack you like, for later game.

Reason for Karma (Optional)
Successfully updated karma reason!
August 20, 2013 8:58:36 AM from Elemental Forums Elemental Forums

is pretty much what i was thinking for late game,

but throughout i am looking to increase the spawns from each already created camp too.. which does look like a butcher and paste job changing the respawn turns.

 

quicky first try on eclipse, will end up renaming each iteration after i figure out how many levels / turn progression

Code: xml
  1. <span style="font-size: 10px;"><<!-- repeating eclipse 1.0 --></span>
  2. <span style="font-size: 10px;"><QuestDef InternalName="Quest_Eclipse"></span>
  3. <span style="font-size: 10px;"><DisplayName>Eclipse</DisplayName></span>
  4. <Description>The moon has leapt across the sky, blotting out the sun. This is the black day; the day the priests of Ancient Al-Ashteroth feared above all others, for this new, unnatural darkness empowers the forces of chaos and destruction.
  5. All monster player units gain levels depending on current turn.</Description>
  6. <IsStartingPointQuest>0</IsStartingPointQuest>
  7. <AllowQuestRejection>0</AllowQuestRejection>
  8. <FullscreenMovie>Movies\Minicut_Event_Eclipse.bik</FullscreenMovie>
  9. <QuestClass>Minor</QuestClass>
  10. <Repeatable>0</Repeatable>
  11. <TriggerType>TurnNumber</TriggerType>
  12. <TriggerData>100</TriggerData>
  13. <TriggerOrigin>EventLocation</TriggerOrigin>
  14. <SpawnRating>1</SpawnRating>
  15. <Treasure>
  16. <GameModifier InternalName="Reward1">
  17. <ModType>Player</ModType>
  18. <Attribute>AllUnitsGainLevel</Attribute>
  19. <StrVal>WildCreatures</StrVal>
  20. <Value>1</Value>
  21. </GameModifier>
  22. <GameModifier InternalName="Reward2">
  23. <ModType>Player</ModType>
  24. <Attribute>AllUnitsGainLevel</Attribute>
  25. <StrVal>WildlandsPlayer</StrVal>
  26. <Value>1</Value>
  27. </GameModifier>
  28. </Treasure>
  29. <QuestObjectiveDef>
  30. <ObjectiveID>0</ObjectiveID>
  31. <QuestEnd>1</QuestEnd>
  32. </QuestObjectiveDef>
  33. </QuestDef>

only see the two monster race config types - unsure on what the npc configs at the bottom of the file are for, wouldnt mind leveling the "named" wildland mobs while im at it, longer it takes to get to them, harder they become to kill. probably a bit more code then needed, but eh, having the fullscreen bik movie will remind me of what i have done.

wondering what will happen when the mobs hit level 21 now

 

 

 

Reason for Karma (Optional)
Successfully updated karma reason!
August 20, 2013 10:23:16 AM from Elemental Forums Elemental Forums

That looks like it will work as intended. But only testing can say for sure.

You could create a "test" version that triggers on turn 5 (random events only trigger if you have a city, FYI). Do you know cheat mode/reveal map?

Reason for Karma (Optional)
Successfully updated karma reason!
August 21, 2013 9:58:19 AM from Elemental Forums Elemental Forums

well, that was interesting.

 

strung out multiple code sets, renamed to eclicpse1,2, 3, 4

set the turn time to 5,7,9,11

levels 1 @ 5

2 @ 7

2 @ 9

5 @ 11

small map, normal- moderate  across the board.

 

"wildland" areas seem to be gaining exp, but at a slower rate than intended, and some not at all by the looks - edit, after looking at the exp bars, they are, some seem to have much higher exp requirements.

rest of them look to be getting experience (based on player's "exp needed to next level" requirements? but this would not make sense late game, the exp would be much higher and therefore level the mobs a ton, less it is capping off once the value is met), not necessarily enough to level the monsters themselves, but they are gaining levels, including to an extent the secondary members of the groups - almost looks like divide exp is affecting groups of creatures, or they have different exp requirements. no matter - they are gaining levels, just not as expected.

 

the problem though, is that the player is also gaining levels. first thought it was because of custom race or mod, but nope, good ol Relias gained levels right along with the mobs, along with a lesser amount for the starting troops, and frisk the champion lol. likewise for Reslon, queen at level 11 at the end of turn 11.

other playable factions in game however are not gaining exp, Lady I was only level 2, her army still at 1 while Relias was at level 11 - oops.

code itself is stable, no crashes, the bik movie plays each time as a reminder. 

conundrum, as the once or twice ive seen the parent event happen in game, it is always later on turn wise, and didnt notice a connection to player level gain.

 

going to remove reward 2, see what happens.

 

 

Reason for Karma (Optional)
Successfully updated karma reason!
August 21, 2013 1:35:06 PM from Elemental Forums Elemental Forums

After playing around with this code too I noticed the same results.  Giving WildCreatures levels works...though not the exact number of levels that you specify.  They do seem to split the levels among the group in some fashion.  Giving WildlandsPlayer levels does not work.  In fact giving WildlandsPlayer levels actually gives the levels to your sovereign and his/her group.  I thought maybe giving levels to two groups in one quest was the problem so I gave WildlandsPlayer its own quest to trigger on the next turn.  All that did was level my sovereign and his group.  I also noticed that wildlands creatures seem to gain xp on their own every turn.  Have you noticed that too?  Perhaps there is a way to boost that number.

Reason for Karma (Optional)
Successfully updated karma reason!
August 21, 2013 9:26:19 PM from Elemental Forums Elemental Forums

Sirmort -

 

exactly the case, the second reward for wildlandsplayer was leveling player controlled faction.

wonder if specific creature types could be flagged for upgrades? unit class elemental, construct etc.

trying to be minimally invasive for compatibility w whatever mods i add.

still, basics work, going to butcher and paste my way to turn 600 or so, progressively adding levels, and if i can figure it out, some stat bonus's as well.

question for the kind souls out there,

 

monsterunittypes go to level 20.. but player can seemingly go on forever with enough added traits/skills/whatchamacallits - what happens post 20 to monsters? capped? generic last level bonus?

Reason for Karma (Optional)
Successfully updated karma reason!
August 22, 2013 2:57:39 AM from Elemental Forums Elemental Forums

Core Player Abilities has just a whole smorgasbord of faction wide ability boosts - but i cant find the proper coding to apply them only to wild creatures via quest route.

 

 

Reason for Karma (Optional)
Successfully updated karma reason!
August 22, 2013 6:12:47 AM from Elemental Forums Elemental Forums

With regards to Valakov's last post, monsters still get increases in stats that increase per level, just not any of the other stats, unless they are defined for levels beyond 20.  For example, Attack and Armor don't usually increase with level, which is why there are custom level increases until level 20 which often increase them.  Basically, the amount listed for the stats at a certain level is the base stats for that monster at that level - any regular per level bonuses based on what all units get, or those gained from traits such as Endurance I and II, Tough, Large, and Monstrous which increase HP received for each level the monster or creature has gained, as well as the Calloused Hide trait which gives 1 extra armor point per level.  I'm not sure if any monsters get Discipline which increases spell resistance and accuracy per level.  Basically the formula is: check for monster and level - then add on bonuses for all units and for special traits on the monsters.  If it is past level 20, I think the level 20 stats would continue to be used for base stats and then the regular and trait modifications are added on top of that.  Of course it should be possible to add the number of levels the monster has base stats defined for, but I'm not sure whether you need to repeat the entire XML code for that monster before adding defaults at L21 onwards.  I'm sure the other modders would have some idea whether you need to redefine the whole monster or only those tags that have changed.

Reason for Karma (Optional)
Successfully updated karma reason!
September 13, 2013 5:29:38 PM from Elemental Forums Elemental Forums

N/A

Reason for Karma (Optional)
Successfully updated karma reason!
September 13, 2013 7:44:30 PM from Elemental Forums Elemental Forums

(1) Yes you can. You can also mod the core file, but that could get overwritten by patches. If you want to keep it throughout patches, make your own xml file.

(2) Yes that works as long as you have checked the mods box in game. 

Experiment and have fun, and enjoy the pitfalls of XML with the rest of us We have a modding question thread somewhere as well, you can always pop in there for questions such as these. 

 

Reason for Karma (Optional)
Successfully updated karma reason!
September 14, 2013 12:45:06 AM from Elemental Forums Elemental Forums

N/A

Reason for Karma (Optional)
Successfully updated karma reason!
September 14, 2013 11:41:35 PM from Elemental Forums Elemental Forums

Quoting Primal_Savage,


will play a real game with it... immediately.

Suggestions?

I recommend Mountain Dew.

Reason for Karma (Optional)
Successfully updated karma reason!
September 15, 2013 10:31:53 AM from Elemental Forums Elemental Forums

N/A

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #108433  walnut3   Server Load Time: 00:00:00.0000797   Page Render Time: