XML modders brainstorming session. Discuss what is and isn't possible in XML.

Started by Igabod, March 08, 2015, 03:58:16 AM

Previous topic - Next topic

Igabod

I'm starting this thread as a brainstorming session to discuss what is and isn't possible to do through XML modding alone. The suggestions don't have to be for something that would necessarily make for a good mod on it's own. I'm looking for interesting and innovative new ways to manipulate the XML code to do something different than what can be found in the vanilla game or even just suggestions of where small tweaks can be made to alter the gameplay. All ideas are welcome here, from the really simple things to the really complex things. Things that are already being used in mods are also welcome to be posted here as long as you don't just post the whole mod and say "Look at what I did".

I'll start it out with an example of an interesting little thing I found while wandering around through the files.

In the MapGeneratorDefs folder you can find the MapGenerators.xml file which can be edited to change various things such as the number of steam geysers generated, the amount of resources dropped on the map at the start, the amount of resources dropped with the player upon landing, the number and type of meals dropped on the map and with the player and probably a bunch of other things that I didn't notice. And if you happen to be capable of doing a .dll mod then you can even write your own classes to be used within this file, but I have no experience with that and this is an XML discussion so I'll leave it at that.

Shinzy

Well I felt pretty happy with my schematic system in Apparello
i'ts basically just your usual crafting but I feel like I got it to feel whole lot different and exciting
(atleast for myself!)
Edit: Whole thing revolves around a material you get back after the craft is done (very, very simple little thing)

also them socks and boots and so that I discovered you can do
when some whiney bum came report a bug of some kind. I mean ugh, gosh!
;D *poke*
Edit: All you need to do is define the bodypart groups -> Shoes, socks = Feet, wannoo be able to wear both? Layers! yay

I don't know if making your very own unique material group is innovative enough
but it does give you bit more free reins on doing stuffs
like say potato mush walls and forts so that you still can't make tables out of them
or unique banana peel slippers
the most deadly footwear
Edit: All needed is to plop Stuff categories in the stuff props as "MyMaterialGroup" or something like this
And making new stuff category def for that thing, and ofcourse bind it to all the items that use this material
again very simple but let's you make your own materials you don't want to be used in the vanilla things


Igabod

Quote from: Shinzy on March 08, 2015, 08:03:34 AM
Well I felt pretty happy with my schematic system in Apparello
i'ts basically just your usual crafting but I feel like I got it to feel whole lot different and exciting
(atleast for myself!)

also them socks and boots and so that I discovered you can do
when some whiney bum came report a bug of some kind. I mean ugh, gosh!
;D *poke*

I don't know if making your very own unique material group is innovative enough
but it does give you bit more free reins on doing stuffs
like say potato mush walls and forts so that you still can't make tables out of them
or unique banana peel slippers
the most deadly footwear

Those are all great subjects, you should provide a little more detail on how you accomplished those things though. I am hoping this thread will be a resource that other potential modders can use to both gain ideas and maybe find out how to do specific things. You don't have to go into full details about every step, but some general guidance on how you accomplish said things could go a long way in helping others out.

ItchyFlea

One thing I'll say is that removing of a vanilla building from the game without breaking existing saves only requires you to remove the <designationCategory> tag from building. That way ones that already exist in saves remain intact. (You could then go on to cripple the building by axing other parts of it's xml, depending on what that building is.)

Other things that may be useful:
Recipes:
If you want a new worktable to use an existing in-game recipe, you don't have to modify the recipe, just use the <recipes> tag in the worktables .xml. It's a list tag, so multiple recipes can be added at once. See the Cooking Table definition to see how that tag is used.
If you want a new recipe to use an existing in-game worktable, you don't have to modify the worktable, just use the <recipeUsers> tag in the recipes .xml. It's also a list tag. See my Stonecutting tweak mod to see how the tag is used.

Can't think of anything else at the moment, but it is 3am for me, so I'm going to use being tired as an excuse. :)
All my mods are licensed under a Attribution-NonCommercial-ShareAlike 4.0 International
Ask for permission before using in ModPacks

Click here for a list of the mods I've created

Latta

You can 'attach' bayonet on your gun by simply adding a ranged verb AND a melee verb to weapon's definition.
It will display two order buttons, being one ranged, another being melee.

Shinzy

Quote from: Latta on March 08, 2015, 10:06:11 AM
You can 'attach' bayonet on your gun by simply adding a ranged verb AND a melee verb to weapon's definition.
It will display two order buttons, being one ranged, another being melee.
Gunblade! someone make one! now!

Igabod

Quote from: ItchyFlea on March 08, 2015, 09:50:28 AM
One thing I'll say is that removing of a vanilla building from the game without breaking existing saves only requires you to remove the <designationCategory> tag from building. That way ones that already exist in saves remain intact. (You could then go on to cripple the building by axing other parts of it's xml, depending on what that building is.)

Interesting, I never thought of that. So basically the table is still in game, just no longer buildable through the architect menu. I'm guessing this would be especially useful for the overhaul mods. Thanks for sharing.


Quote from: Latta on March 08, 2015, 10:06:11 AM
You can 'attach' bayonet on your gun by simply adding a ranged verb AND a melee verb to weapon's definition.
It will display two order buttons, being one ranged, another being melee.

Also pretty neat. Is that maybe already being used by one of the mods that adds new weapons? I haven't ever used a weapons mod so I don't know, but it seems like it would be used by Project Armory at least for one of the historical weapons.

Latta

At least I used it with my Claymore shotgun of RimEffect! But had no chance to test it in a real fight because it was too expensive.

KnucklyDuck

Quote from: Latta on March 08, 2015, 08:00:54 PM
At least I used it with my Claymore shotgun of RimEffect! But had no chance to test it in a real fight because it was too expensive.

Then make a Dev version which makes it craft-able for like 1 wood, just to test it out. I'm pretty curious.
Why do Java programmers have glasses?
.
.
Because they can't C#.

Shinzy

Quote from: KnucklyDuck on March 09, 2015, 05:14:17 AM
Quote from: Latta on March 08, 2015, 08:00:54 PM
At least I used it with my Claymore shotgun of RimEffect! But had no chance to test it in a real fight because it was too expensive.

Then make a Dev version which makes it craft-able for like 1 wood, just to test it out. I'm pretty curious.

(or spawn it iiiin! along with some enemies to test it on!)
just tested it on my Kurtech SMG, works like a charm!
I may have to make use of this now ;D it's friggin cool

[attachment deleted due to age]

skullywag

Didnt i do this on my tomahawk..if i didnt, i meant to....and remember you can add custom verbs and do a multitude of other things. That is however dll modding so...
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

apljee

Quote from: Latta on March 08, 2015, 10:06:11 AM
You can 'attach' bayonet on your gun by simply adding a ranged verb AND a melee verb to weapon's definition.
It will display two order buttons, being one ranged, another being melee.

Could someone give me the outline on how to do this? would I just add two verbClasses, one melee and one ranged?

Latta

Quote from: apljee on March 09, 2015, 07:27:31 PM
Quote from: Latta on March 08, 2015, 10:06:11 AM
You can 'attach' bayonet on your gun by simply adding a ranged verb AND a melee verb to weapon's definition.
It will display two order buttons, being one ranged, another being melee.

Could someone give me the outline on how to do this? would I just add two verbClasses, one melee and one ranged?
Yes. So simple.

apljee

Quote from: Latta on March 09, 2015, 07:29:51 PM
Quote from: apljee on March 09, 2015, 07:27:31 PM
Quote from: Latta on March 08, 2015, 10:06:11 AM
You can 'attach' bayonet on your gun by simply adding a ranged verb AND a melee verb to weapon's definition.
It will display two order buttons, being one ranged, another being melee.

Could someone give me the outline on how to do this? would I just add two verbClasses, one melee and one ranged?
Yes. So simple.

example taken from stone age tomahawk from my mod...

<ThingDef ParentName="BaseMeleeWeapon_Blunt">
<defName>Ancient_Melee_Club</defName>
<label>Club</label>
<description>A weapon that is very deadly even at this point in time, it is used in a bludgeoning manner with extreme force to break bones, and crack skulls.</description>
<graphicPath>Things/Ancient/Club</graphicPath>
<statBases>
<MarketValue>190</MarketValue>
<MaxHealth>100</MaxHealth>
<WorkToMake>575</WorkToMake>
<MeleeWeapon_DamageAmount>14</MeleeWeapon_DamageAmount>
<MeleeWeapon_Cooldown>2.5</MeleeWeapon_Cooldown>
</statBases>
<equippedAngleOffset>-45</equippedAngleOffset>
<stuffCategories>
<li>Ancient</li>
<li>Woody</li>
</stuffCategories>
<verbs>
<li>
<verbClass>Verb_MeleeAttack</verbClass>
                                <verbClass>Verb_Shoot</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<meleeDamageDef>Blunt</meleeDamageDef>
</li>
</verbs>
  </ThingDef>


would be acceptable? (Don't mean to turn this into a help topic... just trying to work out my kinks.)

Latta