Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - ExoticButts

#1
Help / Adding entirely new defs using Xpath.
May 03, 2018, 02:34:17 PM
As usual, my title says it all. How does one achieve this? Let's say I have my example code here;
https://pastebin.com/xGZmaEZU

Now, this is all placed after a bunch of code-that actually works-that adds segments to existing defs, which is all well and good, but only half of the versatility I need in this particular case.

Am I simply doing something wrong, or can you not add whole new defs (note, not Defs, their child nodes, such as ThingDef, RecipeDef, etc.) using xpath patching?
#2
Yeah, I tried using the buildingDef tags at one point, just in case.

Ultimately for now I've just assigned the "highest" research as the required one, although your ideas of gating the workbench/using multiple parts with their own gates are both solid suggestions :D
#3
That's... actually much more than I expected. Still only half of what I was inquiring about, but it'll certainly help too, thanks :)

EDIT: After considerable amounts of scrolling, that actually IS what I was talking about. Awesome, tyvm :D
#4
As usual, my title says it all. I need multiple research prerequisites on the one weapon, that AREN'T on the same tree path, but I need them to not overwrite each other (setting multiple researchPrerequisite in the recipe handler overwrites the former with the latter). I've tried throwing an "s" on the end of that node, to no avail, as well as just "prerequisites", also to no avail.

The game seems to register the two distinct research requirements from BaseMakeableGun and my thingdef, but can only accept one from my thingdef for some reason.

Is there some sort of convoluted node I need here, or is it just not doable?
#5
Title says it all. I've no real need for such a reference, but the convenience for certain bits of debugging/rebalancing/trying something new would be great. I know there's a pinned post regarding something of this nature, but the last commit to the Github they linked was nearly 2 years ago.

Does anyone know of a reference sheet stored somewhere that has ALL the XML nodes usable in each definition file? If so, I'd rather appreciate someone linking it, as the wiki is, well, rather useless except for absolute newbies (and XPath Patching reference).
#6
Thanks Jibbles, I got a few other things done before going further into fixing this explosion and found how to colour it, as well as display motes properly. Now all I have to do is make a new mote for a liquid burst; standard motes don't really have that.

Good idea with the filth too; I've done stuff using preExplosionSpawnThing for some grenades I've done (this weapon is a launcher though, not nades), but that certainly fits well with what I'm aiming for, ty!
#7
Just remember though, downing any non-Colonist has a 67% chance to instakill, hardcoded. I've got a few weapons I'm working on that do some pretty cool stuff, and have had to balance them around this instakill chance.
#8
Help / Explosion Colours/Motes without C#. Doable?
April 24, 2018, 01:13:03 PM
Title says it all. Essentially I'm working on a projectile made of liquid and am looking to have a green splash effect, be it a mote or recoloured firefoam, but I'm uncertain of how to do it, and it's too much of a niche thing for any of the tutorials to have in them.

So, my questions are these;
1. Is it possible to trigger Motes/use Effecters without C#?
2. If it isn't, then is it possible to change explosion colours without C#?

P. S. I'm by no means new to coding, but I'm avoiding C# as I don't intend to learn an entirely new coding language just to make some green splashes. I think that's fair.
#9
Tried posting on Steam discussions, with no response, so I decided to try here.

I'm making a depleted uranium rifle, with the intention of it being mid-powered in terms of outright damage, causing no bleeding at all (despite firing bullets) but igniting hit pawns and inflicting burns. The weapon loads up fine, fires fine, but upon impact on any pawn, it causes a form of NullPointerException whereby the game seems to try to force itself to find a bleedRate, regardless of there not being one. This causes the infinite Consciousness calculation.

I can't justify giving it bleeding effects as the custom damagetype is "Cauterized Gunshot", i.e. no blood loss inflicted. Applying a bleedRate to the current code also did nothing to solve the problem, either at decent levels or miniscule levels.

One of my other weapons has fully working code that doesn't cause bleeding, so I'm uncertain of what the true cause is. As far as I can tell, it's something to do with the game not wanting a projectile to ignite something.

This mod uses no assemblies, but it does use the Damageworker_Flame workerClass, which might be the cause of the problem, although the T-9 Incendiary Launcher in vanilla uses it as well.

So, ultimately, I turn to the modding community here. What could be the problem, and if you know what the issue is, please let me know how to solve it.

If you need the code itself, check the attachments. They are altered versions of my full files that include ONLY what the depleted uranium rifle uses.

A thanks in advance to anyone who can help me with this; the sooner this gun is working, the sooner I can make some other interesting weapons and potentially get the mod up on the Steam Workshop :)

EDIT: A friend of mine working as a programmer pointed out that I was inflicting the custom hediff of Cauterized Gunshot, but also inflicting a vanilla Burn. I realise that the former IS the latter and removed the additional Burn, which fixed the error :D

[attachment deleted by admin: too old]