[GS] LUA Mod Update Quirk Affecting Starting Units

Enj0y

Chieftain
Joined
Jul 9, 2014
Messages
31
Location
Orange County, CA
Hey There -

I'm updating a handy little script originally written by Gyogen that lets you edit what type of units and how many of said units the players gets at the start of the game. It also does some other things, but those seem to be working peachy.

The issue with the units isn't that it doesn't generate whatever you tell it to, it's (maybe) a Maori specific thing. The newly created units appear, but don't receive the Maori trait of +2 embark movement. The original Settler and Warrior get the trait, but the added Scout and Settler in my test didn't.

Any thoughts? Am I missing some new LUA quirk for GS?

Only "global" Civ/Leader traits are left off. Anything tied to a specific unit remains intact. Like in the Maori example, the Toa keeps it's -5 combat strength to adjacent units ability. If that helps...
 

Attachments

It turns out that after the initial turn all Civ specific bonuses kick in. However, now it's more of a nagging curiosity as oppose to a practical concern as to why this is. It just bugs me.
 
I've found that units created directly from lua usually don't get their total set of add-on modifiers implemented until the next turn gets processed.

Units that are purchased via gold or faith are sometimes not given the "full" value of all the modifiers attached to them until turn processing depending on the sort of modifier being applied. I had a modifier that increased all of a player's land units movement by +1 that was granted via an ability that was added from constructing a world wonder. When I purchased a unit or when a unit (a Scout for example) was given by stepping on a goody hut, the extra move did not get completely applied until the next turn. For a scout given by a goody hut the movement would be shown as 3 of 4 movement points available on the turn created. This did not suprise me to a great degree however since I had experienced the same issue in Civ5 where quite a few of the UnitPromotion effects were not completely implemented until the game had a chance to do turn processing at least once after the promotion had been applied to the unit. I'm guessing the game-engine "handling" of these add-ons is similar in Civ6 for UnitAbilities and modifiers otherwise attached to units that are not inherent to the unit.

I say "guessing" only because at the moment we cannot have a DLL MasterSmith (ie, he who is known as Gedemon) look directly at the source code for us.
 
I appreciate that. It was just a quirk that was bugging me. Just something to keep in mind I guess when using this to test units.
 
Back
Top Bottom