[Mod Request] No Mechs and changed Ship Parts

Started by Blitz, December 17, 2015, 10:25:16 PM

Previous topic - Next topic

Blitz

Hey Modders,

I'm planning another LP series with a strange twist to it. Is there a way that one of you talented people can remove the mechs from the game and change the ship parts so that raiders come out of it instead of mechs? I'd like the ship parts to be still fairly strong, but not over the top crazy. If that is too difficult, could the ship parts be removed from the game entirely?

Thanks,
Blitz

TenSaidYes

Not that I needed any 'extra' reasons to watch your LPs... but now I gotta find out what this twist is.

Britnoth

Removing them entirely is perfectly straightforward. Just need to remove the chance of mechanoid raid chance in the Factions.xml, and the poison and psychic ship part chances in Incidents_Bad_ThreatsBig.xml

Changing the pawns spawned to say, pirates instead may need a bit more thought.

The class that handles these building types looks to be hard coded to spawn anything flagged with the <mechanoid>true</mechanoid> flag.

This is not defined in PawnKinds_Mechanoid.xml, but in Races_Mechanoid.xml. You would need to define a 2nd human race but with the mechanoid flag added to it, and removed from the existing mechanoids. Then define new pawnkinds using this new race so the code sees pawnkinds it is allowed to spawn. I don't know if any other part of the code uses this flag for anything, so this may cause strange behaviour.

Being a new race, you will probably need to add new definitions to existing code to allow them to be treated as such. If I recall correctly, pseudo-human races like norbals are not allowed to be given colonist operations without adding, or changing the existing bills.

Overall, I think it might be a lot easier to just take the existing building class they use, edit it to look for a different flag (say <defaultFactionType>Pirate</defaultFactionType> ) instead, and then disable the existing ship parts from firing and replace them with your own using the new building class. This will need its own DLL however not just XML changes.


Also, a ship part spawning humanoids is a bit of a problem. Normally the only human raid that stays in place is the siege. Which has code to spawn food so they do not starve. Left unchanged they would all die or go insane after a few days making the ship part pretty much a non event. I'd recommend changing the edited building class to have the spawned pirates not bother to attempt to defend the ship part and just to assault the base immediately.

Personally, I find the ship parts to be extremely easy to expoit to the point of making them very easy to deal with, but that is just me. :)

Blitz

I kind of figured that removing them would be straight forward, while changing the ship parts would be a little more problematic. Thanks for the tip on this!

Secondary question - how would I go about creating an actual mod that would remove the mechs? I want it to be able to be distributed to my viewers so they can install it rather than playing around with their xml files.

TLHeart

Quote from: Blitzkriegsler on December 18, 2015, 01:40:00 PM
I kind of figured that removing them would be straight forward, while changing the ship parts would be a little more problematic. Thanks for the tip on this!

Secondary question - how would I go about creating an actual mod that would remove the mechs? I want it to be able to be distributed to my viewers so they can install it rather than playing around with their xml files.

export the xml files you want to change, make the changes, and save into a folder named Defs.
You will also need a folder named About. Both of these are subfolders to the Mod folder Mech removal.

Attached is how I would make the changes.

[attachment deleted due to age]

Blitz

Thanks!

Another modder has packaged one up for me. We'll have a new series starting up tomorrow (hopefully...)

TLHeart

Quote from: Blitzkriegsler on December 18, 2015, 03:38:10 PM
Thanks!

Another modder has packaged one up for me. We'll have a new series starting up tomorrow (hopefully...)

your welcome, hope you are not using any other mods that change the factions defs, or you will be getting unexpected results.

Florius

Quote from: Blitzkriegsler on December 18, 2015, 03:38:10 PM
Thanks!

Another modder has packaged one up for me. We'll have a new series starting up tomorrow (hopefully...)

Just waiting patiently for your new LP series (and the mod, really curious about that :) )