• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

Worker Mod

xienwolf

Deity
Joined
Oct 4, 2007
Messages
10,589
Location
Location! Location!
At Wyrmhero's Request I hereby present:

The Worker Mod

This mod replaces the .DLL, so has numerous incompatibility issues. Basically every patch will break it, and it won't work with Fall Further or quite a few other non-modular mods. However, everybody has my standing permission to use this in their mods as they see fit. All new tags added in the DLL and Schema are set to be optional, so are easily NOT used should someone wish to borrow the full DLL for only a part of the functions. The current version works for FfH 2.31e.

To install the mod, download the .zip file and unpack it to overwrite your Assets Folder. Yes, tell it to go ahead and overwrite everything in there.

-----------------------------------------------------------

Changes:
  1. Added <bWorkRateChange> to the CIV4PromotionInfos.xml
  2. Workers & Settlers are now their own Unitclass. As such, they are able to gain Promotions (note: Mud Golems are still just golems, and cannot gain promotions). Workers start with Aptitude 1, Settlers with Aptitude 1 & 2.
    Spoiler Promotions Available to Workers :

    Aptitude I/II/III - Aptitude I & II provide a 30% chance per turn of gaining an XP, Aptitude II provides a 60% chance. This chance is decreased by the current XP of the worker, so at higher XP levels it will be very unlikely. All Workers start with Aptitude I, Level 4 is required to gain Aptitude II, and Level 7 is required for Aptitude III.

    It is essentially neccessary to get all 3 levels of Aptitude for a Worker since that is the only way to get XP, but it is up to the player to decide precisely how important they are, and thus in what order to get them. As a warning though: You cannot get beyond 30XP without Aptitude II, 60XP without Aptitude III, or 120 XP without combat, and you gain XP quicker with all 3 ranks at any XP level.

    Skilled I/II/III/IV/V - Each Skilled promotion increases the worker's build rate by 10%. These are available without any pre-reqs

    Hardy I/II/III - Each Hardy promotion gives a unit 0/1. That's one defensive strength. This makes sure they go down with a fight. They still cannot attack. These are available without any pre-reqs.

    Mobility I/II & Sentry I/II - As usual. These allow better co-ordination, and it also allows a worker to see danger and flee from it. Remember that you need Horseback Riding for Mobility, and Tracking for Sentry.
  3. Workers (but not Slaves) can upgrade to Settlers
  4. Orthus's Axe provides +100% Workrate
  5. Golden Hammer provides +75% Workrate
  6. Empower Provides +5% Workrate for each level
  7. Enabled Haste, Mutation & Loyalty to cast on Workers.
  8. Enchanted Blade grants +10% Workrate and can be cast on Workers.
  9. Hardy 1 can be gained by Mutation
  10. Industrious Trait grants Skilled 1 to Workers
  11. Defender Trait grants Hardy 1 to Workers
  12. Expansive Trait grants Mobility 1 to Workers

-----------------------------------------------------------

Mailbox's Improvements Modular Mod should work with this just fine if you use his Fall Further version.
 
Will this eventually have the ability to make promotions allow (and maybe also block) build orders?
 
Will this eventually have the ability to make promotions allow (and maybe also block) build orders?

That'd be a mod in an entirely different area of the code, but would be a nice addition - it's something I could certainly use.

Impressive how quickly this went from theory to implemented though - nice work Xien :goodjob:
 
I will probably play with making that possible. But I'm currently checking out if I can fix Modular Loading so that all variables are indexed properly. Could take me quite some time to figure out if I have it all solved properly or not and get back to working on this.


I re-uploaded the zip to include my changed DLL files this time. So that it can be incorporated into other Mods. (hint hint - Vehem)
 
I second that hint hint :D - and also Vehem's impressedness at how quickly you got this done.

Incidentally, I'd be surprised if there wasn't some interest in a vanilla BtS version of this. Hmm, unless the XP-gain over time was an addition of Kael's in which case it'd be trickier to do :)
 
That part is an addition of Kael's, but you would just have to hunt down what code allowed it and then copy/paste. Debugging tends to be the longer portion of most mods IMO. Though sifting through ALL of the DLL for the appropriate changes could be a tad tricky.

Re-uploaded again to add an AI Weight to the XP gain promotions. Don't want them to forget to take what is vital to the unit.

Tempted to lower the movement of Slaves by 1, and otherwise restrict them under this system. But I'll leave the 1/2 base workrate as enough of a penalty for the time being.
 
I third the surprise at speed... I'll try this tommorow, as its half 10 in this timezone.
 
So this is compatible with your other Modules?
 
Should be perfectly fine working with the Modules. The new XML fields were set to be optional for much that reason :) Though if any Module modified the Workers or Slaves that might cause problems since they wouldn't be set to start with Aptitude 1. But to my knowledge none modify those simple units :)


EDIT: Looked over the DLL to see how I would go about adding in Build Orders through Promotions. Those Build Orders are so deeply embedded in everything as is though that I am not willing to take a crack at it thus far. I was hoping that it would turn up that it collects information on what a Unit can Build, then does all the fancy footwork elsewhere for AI and whatnot, but I haven't found a singular spot where it seems to compile what a unit is capable of.

Mild pity too. I was fond of making some promotions available to normal units which gave a decent WorkRate and allowed them to construct Roads or other useful things in places a bit dangerous to send a Worker. Though I know that it causes some issues with the AI and spinlocks (hence the Hunters losing the ability to build camps in the main mod). But overall no huge loss. I wanted to keep this fairly simple as the original idea had been, so that it is a minor change and many more people will be wanting to use it.
 
Just out of interest, how did a hunter being able to create camps make spinlocks? Surely they could build it once, one a place with deer/fur? Or were they razing the newly made camps?
 
Just played my first game with the worker additions, (until it crashed, but I have so many modular mods on, it may not be this), and I've found something. When you promote a unit to Aptitude III, the promotion disappears off the promotion list. When you hover the cursor over the unit, it still has it. I also managed to get a worker with over 100 XP. :woohoo:

Orthus attacks my heavily defended Elohim city where I had only a worker in there, (fighting a war vs. Lanun) with about +70% defense, due to the Elohim with Spice mod, and offs himself, due to my luck, and the fact that he only had one combat promotion, and my worker has Hardy III :rotfl:

So far, it seems the AI will only give workers the Mobility promotion (Lanun workers with 4 move :p), but luckily when I attacked them, they go back to unupgraded/no experience workers. Also, in the Civiliopedia, it says you need just Apt I for Apt II, and Apt II for Apt III, when that is not true.

Also, thanks so much Xienwolf! :goodjob:
 
I had noticed the Aptitude 3 dropping off the visible when i was test early on, but forgot about it. Strange indeed. Totally missed the Aptitude failing to show the Pre-Req's properly in the Civlopedia though, so I'll have to glance at those and see if I can figure out the issue.


Awesome that they can get past 100, I guess Caster XP doesn't cap out like Hero does, it just isn't really possible for an Arcane unit to get a chance high enough that you'd ever see it :)

The reason you don't get the promotions from someone else's workers when you capture them is that you are actually killing the unit and spawning a completely new one (like as if you used a Taskmaster against another unit, with a 100% chance). I'll have to check if there is a way I can make you actually capture the unit you attacked so that you keep the promotions... Could be a tad tricky.


Worker kills Orthus though.... Man I hope you got a Screenshot for the Funny Screenshots thread... :) :ninja:
 
The worker that killed Orthus ought to get a big bonus on cutting down trees, thanks to the Axe.
 
Darn... I knew there was something I forgot to do... :sad: And the reason my worker got over 100 XP was because he defeated Orthus. Now workers are a unitcombat type, does this mean you can Haste them, or give them equipment?
 
You would have to edit CIV4PromotionInfos.xml to add UNITCOMBAT_WORKER to the <UnitCombats> of promotions (such as Hasted) that are granted by spells in order for those spells to effect them.

I thought workers could already take equipment?
 
Anyone can grab equipment since it is done through Python. I think it is appropriate to add a WorkRate bonus to Orthus's Axe, cute idea :)


I didn't make any of the spells available for Workers yet. It is a good idea though, so I'll look into it.
 
Hmmm... Maybe Orthus' axe could allow any unit to cut down forests anywhere... That'd put an end to those nasty elves...:devil:
 
Well, that one gets back to the Build Orders via Promotion issue :) I was thinking along the same lines though initially. A unique Order called "Decimate Forest" which allows you to chop any forest or Jungle in 1 turn, without any Tech Requirements, available to anyone with the Axe (since it also grants a workrate it would be useable by everyone).
 
Yeah, that sounds good. I'd definatly use it against the elves...
 
Back
Top Bottom