[Mod] Gender Equality (Updated March 9 2014)
#1
GenderEquality mod for Modern Times

Rewritten 08/31/2013
I decided to change my whole approach to doing this mod. I originally created new classes of citizens by copying the tables for existing ones and then editing them to fit where I needed them. Now the mod defines the class from scratch in an OnMsg.ClassesPreprocess function. This allows the new classes to have the ability to shapeshift. Shapeshifting allows me to get around the issue of missing animations for entities. Instead of rewriting a work function so that it bypasses an animation that does not exist for an entity, the mod shapeshifts the worker to an entity that does have the animation and then shifts them back. Doing it this way opens up the possibility of adding female variants to soldiers, police, fireman, and swat without having to rewrite a ton of their functions that have to do with combat and arrests. Some users who like to follow and stalk their citizens may not like this change because they will suddenly see their victims turn into dudes. To them I apologize but it's necessary and I assure you it's only temporary and cosmetic. The game will still consider them to be females the entire time. These changes also affect how the mod is installed. See below.


What this mod does:

Attempts to make certain jobs available to both genders. To make this work a new class(type) of citizen needed to be created for each position. The new class was cloned using an existing class of citizen. They will look like an existing class. Not every class has every type of animation associated with it. For example: no female class has the animations the miner uses when chipping away at rocks. This mod attempts to get around that by making the female workers shapeshift into male workers when they are doing a job that requires specific animations. This is most noticeable with the Logging Camp. A female worker will walk into the building, turn into a male, go chop down a tree, bring it back to the building, then turn back into female form.


New Workers
  • TeamsterFemale
    • Cloned from: Female Factory Worker
    • Works in: Garage, Teamster's Office
  • AttendantFemale
    • Cloned from: Shopkeeper
    • Works in: Aquapark, BalloonRide, BeachSite, FerrisWheel, IslandTourOffice, Marina, MovieTheater, Pool, RollerCoaster, Spa, ZeppelinDock, Zoo
  • ProfessorFemale
    • Cloned from: Bureaucrat
    • Works in: AcademyOfScience, BotanicalGarden, College, ColonialMuseum, HorticultureStation, Museum, NuclearPowerPlant, NuclearProgram, RadarDish, WeatherStation
  • BishopFemale
    • Cloned from: Teacher
    • Works in: Cathedral, CrystalCathedral
  • BankerFemale
    • Cloned from: Bureaucrat
    • Works in: Bank, Modern Bank
  • MinerFemale
    • Cloned from: Female Factory Worker
    • Works in: BoreholeMine, Mine, SaltMine
  • DoctorFemale
    • Cloned from: Engineer
    • Works in: HealthClinie, Hospital, Sanatorium
  • FishermanFemale
    • Cloned from: Female Factory Worker
    • Works in: FishermansWharf, FishFarm
  • PitBossFemale
    • Cloned from: Bureaucrat
    • Works in: Casino
  • CustomsOfficerFemale
    • Cloned from: Bureaucrat
    • Works in: CustomsOffice
  • DockworkerFemale
    • Cloned from: Female Factory Worker
    • Works in: Dock, PassengerDock
  • GarbagemanFemale
    • Cloned from: Female Factory Worker
    • Works in: GarbageDump, WaterTreatment
  • LumberjackFemale
    • Cloned from: Female Factory Worker
    • Works in: LoggingCamp
  • ProAthleteFemale
    • Cloned from: Journalist
    • Works in: SportsComplex
  • StockBrokerFemale
    • Cloned from: Female Office Worker
    • Works in: StockExchange
  • PolicemanFemale (Added 08/31/2013)
    • Cloned from: Bureaucrat
    • Works in: PoliceStation, Prison, Dungeon,
  • FiremanFemale (Added 09/10/2013)
    • Cloned from: Constructor
    • Works in: Firestation
  • EngineerMale (Added 09/04/2013)
    • Cloned from: Constructor and OfficeWorker
    • Works in: Airport, AirportModern, ElectricPowerPlant, OilRefinery, OilWell, TelecomHQ
  • ShopkeeperMale (Added 09/04/2013)
    • Cloned from: OfficeWorker
    • Works in: ChildhoodHome, Marketplace, ShoppingMall, SouvenirShop, Supermarket
  • MaidMale (Added 09/04/2013)
    • Cloned from: Constructor
    • Works in: BeachVilla, Bungalow, Hotel, LuxuryHotel, LuxuryLiner, Motel, SkyscraperHotel, SkyscraperHotelModern
  • JournalistMale (Added 09/04/2013)
    • Cloned from: OfficeWorker
    • Works in: MuseumOfModernArt, Newspaper, RadioStation, TVStation
  • CookMale (Added 09/04/2013)
    • Cloned from: PitBoss
    • Works in: CosmicPin, GourmetRestaurant, Restaurant, ShipORant
  • BureaucratMale (Added 09/04/2013)
    • Cloned from: Banker
    • Works in: DiplomaticMinistry, ImmigrationOffice
  • TeacherMale (Added 09/04/2013)
    • Cloned from: Professor
    • Works in: GradeSchool, HighSchool
  • BarmaidMale (Added 09/04/2013)
    • Cloned from: OfficeWorker
    • Works in: Nightclub, Pub
  • ShowgirlMale (Added 09/04/2013)
    • Cloned from: Lumberjack
    • Works in: Cabaret, Theater
New Edict (Added 9/10/2013)
  • An edict now activates this mod.
  • It's located in the Interior section
  • Cost: 1000

WARNINGS
  • Using a mod voids eligibility for customer support from the game publisher.
  • DO NOT USE WITH SAVED GAMES MADE PRIOR TO INSTALLING THIS MOD.
  • DO NOT USE SAVED GAMES MADE WITH THIS MOD AFTER REMOVAL
  • This mod might not work with scripted events in campaign or challenges that are looking for X type of workers hired/placed. You may have to fire the females and have them replaced by males for certain triggers to be met.


INSTALLATION

If you have a previous version of this mod DELETE IT FIRST. The download file contains multiple copies of the mod to accommodate differences in installed DLC content. Unzip the download to your Tropico 4 install folder. It's possible your combination of DLC content will not work with this download. If the mod does not seem to work at all please post what DLC content you have installed. Fixing it is most likely as easy as moving the mod file to the correct directory. You can check if the mod is loading by opening up the latest log file after exiting the game. It will be located in "%appdata%\Tropico 4\logs". If the mod is loaded you should see a line that contains "Gender Equality by DarthPresidente loaded..."

This MOD is in the testing stage yet. I'm looking for feedback and errors. When posting errors be as specific as possible and include any relevant information from your game's log file. Log files are stored in: "%appdata%\Tropico 4\logs" Please enclose log file data in [code][/code] tags.

File:
Mod File: GenderEquality.zip

Tropico 4 Mod Index
Reply
#2
Interessting work, will try it later! Smile

I do have a question: It seems you are still modding for tropico. Do you know why the modding section is dead?

Are there any other sites for tropico modding?

Because i really want to mod tropico, but there are some kind of problems, especially because of the compiled-lua-issue i dont know how to work arround.

I'm sorry for kiddnapping your tread, but i got no answer in the others.

Will test your mod, and give feedback later.

EDIT: Ok, have tried you mod. There isnt any problems with that, except the issue with the missing animations(e.g. for the Lumberjack/Woodcutter Woman). Got no errors or crashes or something. Thank you for this good mod. Smile

Why do you dont add this as an edict, so you could choose if you want to be more free thinking and democratic, or to be an chauvinistic country ruler Big Grin

-Ska
Reply
#3
(28-08-2013, 04:55 PM)Skabus Wrote: Interessting work, will try it later! Smile

I do have a question: It seems you are still modding for tropico. Do you know why the modding section is dead?

Are there any other sites for tropico modding?

Because i really want to mod tropico, but there are some kind of problems, especially because of the compiled-lua-issue i dont know how to work arround.

I'm sorry for kiddnapping your tread, but i got no answer in the others.

Will test your mod, and give feedback later.

EDIT: Ok, have tried you mod. There isnt any problems with that, except the issue with the missing animations(e.g. for the Lumberjack/Woodcutter Woman). Got no errors or crashes or something. Thank you for this good mod. Smile

Why do you dont add this as an edict, so you could choose if you want to be more free thinking and democratic, or to be an chauvinistic country ruler Big Grin

-Ska

I am actually a pretty new player to the game so i look at it as just starting to mod vs still modding. I am unfamiliar with any other sites that feature mods or modding for Tropico 4.

I used luadec to decompile the lua files. It's not perfect but it will give you a good idea of how things work.

I haven't played with edicts yet so I have not made it an option in the mod. So far any attempts to define new classes have not survived the rebootlua process with Modern Times. If I were to make it an optional edict it will be the kind that can only be issued once and then remains on. Writing a function to mass fire the ladies seems cruel to me.

Reply
#4
(29-08-2013, 06:02 AM)DarthPresidente Wrote: I used luadec to decompile the lua files. It's not perfect but it will give you a good idea of how things work.

Yeah, I use luaDec too, but there are some problems on decompile so you not get the idea for every function or class in the game.

But its ok, is is how modding is all about^^

(29-08-2013, 06:02 AM)DarthPresidente Wrote: So far any attempts to define new classes have not survived the rebootlua process with Modern Times.

So you have any idea, why the classes wont survive? I add a class definination to the OnMsg.ClassesPreprocess function, but if i open the edict dialog, i get the message that my new edict dont exists.

simcutie add an edict in his mod and he only add it to the OnMsg.ClassesPreprocess function too, but nothing of this worked for me...

(29-08-2013, 06:02 AM)DarthPresidente Wrote: Writing a function to mass fire the ladies seems cruel to me.

Yeah it is. But i dont mind. Its a game and you are the ruler of your country. I mean: hey you can shot an inocennt guy off the street, and that even more crule i think.

Maybe you could let the women work there until they leave their workplace, so you dont fire anyone, only dont hire women anymore.

But as long it dont have any effect on the workplace if a woman or a man worked at the workplace, maybe there isnt any point to add the posibility to turn gender equality on/off. Maybe you could add an effect, so that if women worked at the facility the productivity of this workplaces will be lowered a bit, but their happiness will raise or something like this.


-Ska
Reply
#5
(29-08-2013, 11:34 AM)Skabus Wrote: So you have any idea, why the classes wont survive? I add a class definination to the OnMsg.ClassesPreprocess function, but if i open the edict dialog, i get the message that my new edict dont exists.

simcutie add an edict in his mod and he only add it to the OnMsg.ClassesPreprocess function too, but nothing of this worked for me...

I did some playing around with it tonight. I noticed that since Voodoo came out that using OnMsg.ClassesPreprocess no longer worked even if the file was in ex/game.

When I put the file in Voodoo/game it loaded and worked! I guess I will be rewriting this mod now even though distributing it will be a bit of pain. Users will have to put it in ex/game or Voodoo/game if they have the Voodoo DLC

The link to the download of this mod has been removed pending a rewrite.
Reply
#6
Wow, nice to read that Big Grin

Will try it out later.

Thanks! Smile

As it seems, you have to do that according to the dlcs have, because i dont have the voodoo dlc, so it seems the vooodoo/game folder is only if you have the voodoo dlc. I brought the Tropico4 Collectors Bundle a few days ago, and it misses the voodoo dlc and the new propaganda dlc. So i seems you have to play arround to find out wich folder you have to create. Puh, what a mess...

EDIT: You are a genius! Big Grin Now everything worked fine for me! Smile

-Ska
Reply
#7
(30-08-2013, 12:05 PM)Skabus Wrote: EDIT: You are a genius! Big Grin Now everything worked fine for me! Smile

-Ska

Which folder did you use?
Reply
#8
I bought the last two dlcs, so now i have all dlcs for T4.

I put simcuties mod and my own mod in the "Voodoo/Game" folder.

Finally, i can test my mod. Smile

-Ska
Reply
#9
New version. It's pretty much a full rewrite. Edited the first post to reflect the changes.
Reply
#10
(31-08-2013, 11:28 PM)DarthPresidente Wrote: New version. It's pretty much a full rewrite. Edited the first post to reflect the changes.

Good work, again! Smile

Will try it, and give you feedback later!

-Ska
Reply
#11
Another Update:

Added Male variants for:

Barmaid, Bureaucrat, Cook, Engineer, Journalist, Maid, Shopkeeper, Showgirl, Teacher.

Edited the first post to reflect the changes.
Reply
#12
(05-09-2013, 04:37 AM)DarthPresidente Wrote: Another Update:
Added Male variants for:
..., Showgirl, ... .

A male Prostitute. Very interesting!
Reply
#13
Updated.

Female Fireman added
Interior Edict added

The download now includes a file/folder for Propaganda. After the steam patch the mod gets loaded from Propaganda\game\ directory if you have Propaganda

Unless there are bugs this is probably the final version of this mod. I am reluctant to add female variants for Soldiers, Generals, and SWAT because I have no ambition to play test them.

Edit: Oops, forgot the image file for the edict in the download file. Added now.
Reply
#14
Hello! I can't get this awesome mod working.
My DLCs: The Academy, Apocalypse, Junta, Megalopolis, Pirate Heaven, Plantador, Propaganda, Quick Dry Cement, Vigilante, Voodoo,
Modern Times (10 DLC + Exp). Last DLC is Apocalypse. Steam version, Eng.
I tried different folder placement combinations, tried to place GenderEquality.lua in folder with new DLC (EastPoint or NuclearTakedown). However, log always show one load source even when this folder (Propaganda) does not exist at all.

[Console Error] Gender Equality by DarthPresidente loaded...
[Console Error] Version: Test 4
[Console Error] SourceFile: Propaganda/game/GenderEquality.lua

It seems mod loaded (from log), but edict icon does not appear in Interior section. I tried to move cursor around the place it should be (in case just UI won't load) but it's empty.
My own mod plays fine with all dlc (loads from Tropico 4/Game).

- I tried it without my mod.
- I always start a new game to check If GenderEquality loaded. (Some mission from Modern Times company).
- My current folder structure:
Tropico 4\Game\mymod.lua (works)
Tropico 4\Game\ex\game\GenderEquality.lua
Tropico 4\Game\UI\edicts\genderequality.tga
Tropico 4\Game\Propaganda\game\GenderEquality.lua

Log: http://pastebin.com/sPMdctcX
Reply
#15
(02-11-2013, 09:57 AM)MissNet Wrote: - My current folder structure:
Tropico 4\Game\mymod.lua (works)
Tropico 4\Game\ex\game\GenderEquality.lua
Tropico 4\Game\UI\edicts\genderequality.tga
Tropico 4\Game\Propaganda\game\GenderEquality.lua

Log: http://pastebin.com/sPMdctcX
It's probably a folder location issue. The location that load statement makes is hard coded so moving it won't change it.

I don't own the newer DLCs so I don't know what the folder structure should be. Definitely remove the file from Game\UI.

Best guess: Look in your Tropico 4\DLC folder. You should see hpk files for all the DLCs. Find the hpk file for the latest DLC. Create a folder for that in your Tropico 4 folder. So if the hpk is Apocalypse.hpk then make Tropico 4\Apocalypse\GenderEquality.lua

To get the loading spam to report the correct file\directory replace
Code:
print("    SourceFile:  Propaganda/game/GenderEquality.lua")
with
Code:
print("    SourceFile:", debug.getinfo(1).source:match("@(.*)$"))

Let me know if placing the file works and I will update the download.
Reply
#16
Well, yep. It seems I've done it wrong right from the beginning. I tried to put folders into Tropico 4\Game instead of Tropico 4 install directory. My bad Tongue
With this folder structure it works (for Apocalypse DLC):

Tropico 4\NuclearTakedown\game\GenderEquality.lua
Tropico 4\ex\game\GenderEquality.lua
Tropico 4\UI\edicts\genderequality.tga

And log shows right load source location now.
Thanks, DarthPresidente Smile
Reply
#17
(24-08-2013, 12:51 AM)DarthPresidente Wrote: GenderEquality mod for Modern Times

Running Tropico 4 Gold (MT expansion only)
I get the following Errors:
Code:
ERROR: can not create shader pack file: Path Not Found
                                                                            @ 13619, 156
[Console Error] signin:  Tracking signin changes:  no
[Console Error] signin:  false false
                                                                            @ 13743, 124
[Console Error] Gender Equality by DarthPresidente loaded...
[Console Error]     Version:      Test 4
[Console Error]     SourceFile:    ex/game/GenderEquality.lua
[Console Error] QuickDestroy Snippet by DarthPresidente loaded...
[Console Error]     SourceFile:    ex/game/QuickDestroy.lua
[Console Error] WindTurbine Upgrade Mod by DarthPresidente loaded...
[Console Error]     SourceFile:    ex/game/WindTurbineUpgrade.lua
                                                                            @ 15147, 1404
Reply
#18
Updated the download file to include new DLC folders and fixed SourceFile reporting.

TopDog:

[Console Error] is just what prints when you use print() in a script that is loaded before a certain point. It's not necessarily an error. In this case it indicates that you have the file in the wrong folder because it shouldn't be loading at that point.

Do not put this mod in your Tropico 4\Game folder. Unzip the whole thing to your Tropico 4 directory. GenderEquality.lua should be in the following locations:

Code:
Tropico 4\EastPoint\game\GenderEquality.lua
Tropico 4\ex\game\GenderEquality.lua
Tropico 4\NuclearTakedown\game\GenderEquality.lua
Tropico 4\Propaganda\game\GenderEquality.lua
Tropico 4\Voodoo\game\GenderEquality.lua

Same for QuickDestroy and WindTurbineUpgrade. I also updated the download files for those mod snippets.
Reply
#19
New Version Uploaded.

Fixes an issue with the SWAT HQ building. This is a pretty serious game breaking bug. If you use this mod you should upgrade to the new version immediately. It does not add or remove any unit classes so it is safe to upgrade from the previous version and use with a save game.

Bug Details:

This mod redefined the Policeman class so it no longer inherits the class "Male". Then it creates two new classes (PolicemanMale and PolicemanFemale that inherit from Policeman and Male or Female).

SWATmember inherits from Policeman. When I rewrote Policeman to no longer inherit a gender class it also meant that SWATmember would have no gender class. Oops!

Fix:

Redefined SWATmember to inherit from PolicemanMale.

Sorry for the error. Download link to the fixed file is updated in the first post.
Reply
#20
So I need to delete all the GenderEquality.lua files then download and unzip it again from your first post?
Reply
#21
(14-03-2014, 02:19 AM)Admiral 8Q Wrote: So I need to delete all the GenderEquality.lua files then download and unzip it again from your first post?
With this version you should be able to just unzip them into your Tropico 3 folder and overwrite the existing files.
Reply
#22
(14-03-2014, 04:00 AM)DarthPresidente Wrote:
(14-03-2014, 02:19 AM)Admiral 8Q Wrote: So I need to delete all the GenderEquality.lua files then download and unzip it again from your first post?
With this version you should be able to just unzip them into your Tropico 3 folder and overwrite the existing files.

Yes, thank you Darth, I tried that after turning the 'read only" on my directory off.
Reply
#23
(24-03-2014, 01:19 AM)firesoul453 Wrote: Hello perhaps I am missing something but there doesnt seem to be a way to install this mod.
DO I put the Gender equality folder itself into tropico or the folders inside it.
I've tried doing both but nothing seems to work. I put them in the tropico directory with the exe file.
It also never shows up the logs.

You should extract all the files into the same directory as the Tropico4.exe is located. I bought mine through steam so my tropico4 folder is:

c:\Program Files (x86)\Steam\SteamApps\common\Tropico 4

After the installation I have these new files:
Code:
c:\Program Files (x86)\Steam\SteamApps\common\Tropico 4\Eastpoint\game\GenderEquality.lua
c:\Program Files (x86)\Steam\SteamApps\common\Tropico 4\ex\game\GenderEquality.lua
c:\Program Files (x86)\Steam\SteamApps\common\Tropico 4\NuclearTakedown\game\GenderEquality.lua
c:\Program Files (x86)\Steam\SteamApps\common\Tropico 4\Propaganda\game\GenderEquality.lua
c:\Program Files (x86)\Steam\SteamApps\common\Tropico 4\UI\edicts\genderequality.tga
c:\Program Files (x86)\Steam\SteamApps\common\Tropico 4\Voodoo\game\GenderEquality.lua

You did not mention in your post what DLC content you have. This mod requires Modern Times. If you do not Modern Times it will not work.
Reply
#24
Hi DarthPresidente, I just reinstalled T4 after the T5 reviews piqued my interest and I am currently unable to get this running. It shows up as running in the logs but I do not see the edict in play when I boot up a game. (Does it only appear after a given year?) Could you help me with my file structure? I am not sure if the lack of the new dlc (which I don't desire to purchase unless there is another sale) is a problem. Here is an image:

http://imgur.com/1qrTBK7

The only thing in the Game folder are your immigration and locknot mods (which run perfecto). I have the cement factory, Modern Times, megalopolis, junta, and plantador DLC installed.
Reply
#25
(29-05-2014, 10:04 PM)MUAHAA THE FRENCH Wrote: Hi DarthPresidente, I just reinstalled T4 after the T5 reviews piqued my interest and I am currently unable to get this running. It shows up as running in the logs but I do not see the edict in play when I boot up a game. (Does it only appear after a given year?) Could you help me with my file structure? I am not sure if the lack of the new dlc (which I don't desire to purchase unless there is another sale) is a problem. Here is an image:

http://imgur.com/1qrTBK7

The only thing in the Game folder are your immigration and locknot mods (which run perfecto). I have the cement factory, Modern Times, megalopolis, junta, and plantador DLC installed.

For your DLCs the mod file should be \Tropico 4\ex\game\GenderEquality.lua
Do not place in Tropico 4\Game\

Added June 1st: Try Tropico 4\Update1\Game\

If that does not work can you please paste your log file.
Reply
#26
Ahoy DarthPresidente, once activated, is there a way to un-activate it? Or do I have to delete all the GenderEquality.lua files?
Reply
#27
Hey, Greetings! I got a problem. I know you're not into Tropico 4 anymore, but I guess someone or you could help me a little. After installing your mod (It was awesome By the way.) In the mid years of 1963 etc. my Almanac started to get silly so does the edicts. There's an edict that says, "Defense" and "TTT". It's wierd but I hope someone could help me. Cheers! ^-^
Reply
#28
(27-05-2016, 10:29 PM)AdmiralGeneralUngria Wrote: Hey, Greetings! I got a problem. I know you're not into Tropico 4 anymore, but I guess someone or you could help me a little. After installing your mod (It was awesome By the way.) In the mid years of 1963 etc. my Almanac started to get silly so does the edicts. There's an edict that says, "Defense" and "TTT". It's wierd but I hope someone could help me. Cheers! ^-^

I got this error too. The first two tabs of the almanac became unusable, and those strange edicts appeared. They weren't there til some way into the game
Reply
#29
Hellloooo?
Reply
#30
Female Soldier and Female General?
Reply




Users browsing this thread: 1 Guest(s)