OpenXcom Forum
Modding => Work In Progress => Topic started by: Solarius Scorch on October 02, 2016, 02:03:57 pm
-
I would like to know more about MCDPatches: what is possible to do with them, what is not, and how to use it.
For now, my problem is that I would like to add Zrbite to UFO: EU, complete with its recovery, engines etc. therefore I need to define a new special property of a specific tile that would yield Zrbite (and not, say, Elerium of Alien Alloys).
-
Ohhhhh yes that would be cool adding new recoverable items :)
-
hum not sure i understand what you want to do...
Anyway, AFAIK MCDPatches are used to overwrite values of MCDs, so you can modify the stats of a MCD directly in the rueleset; for example: if a MCD has a armor 10, you can just add an MCDPatches entry that sets it to 50 and you're done.
To implement zrbite in UFOEU i guess you have to regularly make the zrbite-related MCDs (the TFTD engine), then link it to a zrbite item in the ruleset, using this method:
you can also link an MCD to an item, adding a specialType entry to the item; the MCD then should be given the same value to its Target_Type.
example:
specialType: 30 (in ruleset)
Target_Type 30 (in MCDEdit)
(Use a value of 20+ because some values -up to 14 iirc- are already used; max is 99 i think).
The linked item is automatically recovered if that MCD is still undamaged by the end of a mission (1 item for each MCD present on the battlescape).
Then i guess you can use the item to manufacture a craft..? i'm not sure about this.
If you want to check it in practice, i use this method in my mod for human craft missiles.
Or another method is to directly place, using ruleset, items in map: make a zrbite item (i guess you could make it invisible, AKA transparent floorob) and place it on the tile which holds the engine MCD.
Again i use this method in my mod, to spawn stuff like firearms on the empty shelves, or psiclones on altars.
-
To implement zrbite in UFOEU i guess you have to regularly make the zrbite-related MCDs (the TFTD engine), then link it to a zrbite item in the ruleset, using this method.
Yes, this is exactly what I needed, thanks!
So it doesn't involve MCDPatches at all if you modify MCDs directly, yes?
EDIT:
It appears to be working. But how do I change the tile to produce 25 Zrbite instead of 1?
-
Yes, this is exactly what I needed, thanks!
So it doesn't involve MCDPatches at all if you modify MCDs directly, yes?
EDIT:
It appears to be working. But how do I change the tile to produce 25 Zrbite instead of 1?
that's the limit of that technique, you can only link to 1 item (unless Warboy changed it). you have to use the other technique for multiple items.
if you make/tweak your MCDs with MCDEdit, then you don't need MCDPatches at all.
-
that's the limit of that technique, you can only link to 1 item (unless Warboy changed it). you have to use the other technique for multiple items.
if you make/tweak your MCDs with MCDEdit, then you don't need MCDPatches at all.
All right, thanks!
-
Ahh so if I wanted to add say a recoloured item in each UFO map (i.e. called Alien Propulsion) and a separate type of terrain item (i.e. Control Crystal) then I could do this by modifying the map values and not having to add anything in the ruleset except a declaration of a new item?
Is there anywhere I can read on MCDPatches? Is this a software programme or an extension of the ruleset?
-
MCDPatches is a part of a (mod) ruleset that overrides certain values of certain MCD entries. This is mostly used to fix bugs in the vanilla MCD files, so as to not modify them.
Currently, the following values can be mcdpatched:
'bigWall': 'Big_Wall',
'TUWalk': 'TU_Walk',
'TUSlide': 'TU_Slide',
'TUFly': 'TU_Fly',
'deathTile': 'Die_MCD',
'terrainHeight': 'T_Level',
'specialType': 'Target_Type',
'explosive': 'HE_Strength',
'armor': 'Armor',
'flammability': 'Flammable',
'fuel': 'Fuel',
'footstepSound': 'Footstep',
'HEBlock': 'HE_Block',
'noFloor': 'No_Floor',
'LOFTS': 'LOFT',
'stopLOS': 'Stop_LOS',
'objectType': 'Tile_Type',
Ahh so if I wanted to add say a recoloured item in each UFO map (i.e. called Alien Propulsion) and a separate type of terrain item (i.e. Control Crystal) then I could do this by modifying the map values and not having to add anything in the ruleset except a declaration of a new item?
There are items and there are tiles. Adding items is just modifying a deployment (i think) record in the ruleset. Adding a tile, well, that's modifying the map and the MCD set for that map. MCDPatches can't help with this. Clone the map and the MCD set and edit them.
-
Thank you for the explanation Stoddard!
In your earlier post you mentioned something about human craft weapons mod? Would you be kind enough to advise which one this is please as I'd like to have a peak :)
-
Thank you for the explanation Stoddard!
You're welcome.
In your earlier post you mentioned something about human craft weapons mod?
Which post that would be?
-
Sorry Stoddard it was robin who mentioned something about human craft missiles not you lol
Trouble of looking at posts on a small screen.
-
There are items and there are tiles. Adding items is just modifying a deployment (i think) record in the ruleset.
To be precise, you modify terrain, not deployment.
As for Robin's post, he meant his From the Apocalypse mod, so you can check it out. (It's also a very good, complex mod.)
-
Thank you all :)
Your patience is appreciated with a humble noob like me who has only recently founded the wonders of OpenXcom modding.
As soon as I get paid I think I may have to pay an artist to undertake some work for my own mod!
-
So I think I get this after trying to reverse engineer a few things ... (please bare with me lol)
I can create a new tile and put it into mcedit and configure it with a target type of say 31, then I need to declare what that special tile is in the ruleset in 'from the apocalypse' for example it has:
## new:
# specialType list:
# 33 STR_ALIEN_PLASMA_BARREL
I can also see another component called:
- type: STR_DIMENSIUM_161
size: 0.1
costSell: 5000
weight: 3
bigSprite: 56
floorSprite: 37
invWidth: 1
invHeight: 1
This looks like another recoverable item like Elerium 115.
What I can't figure out now is to say have something in my mod (e.g. a recolored ufo power source called anti-gravity generator) which is then fuelled by (you guessed it) anti-graviton crystals of which like elerium would hold 50 per unit. Do I need to place this fuel type item on the map underneath the generator so that it is recovered? If so how do you edit the amount from 1 to to a larger number?
I am totally confused! :o
Appreciate any help here peeps!
--- posts merged - Solarius Scorch ---
Solarius did you get 50 Zrbite in in the end?
-
Nope, AFAIK it's not possible now.
But spawning the item on the ground, under the object is the next best thing.
-
Ahh I see :(
So by doing this you get 1 back each recovery I guess?
-
Ahh I see :(
So by doing this you get 1 back each recovery I guess?
Yes, that's why it's better for recovering machinery than fuel.
-
Yes, that's why it's better for recovering machinery than fuel.
If its the "single item" restriction for it, is there an issue with having a Single Item (Fuel Pod) that Breaks down in the Workshop to 'X' Fuel ?
-
If its the "single item" restriction for it, is there an issue with having a Single Item (Fuel Pod) that Breaks down in the Workshop to 'X' Fuel ?
Nope, it should be fine.