Definitive def/assembly guide?

Started by demeggy, November 11, 2016, 02:08:45 PM

Previous topic - Next topic

demeggy

Evenin' all,

I've been trawling the boards over the past few nights to see if I could find any clear info on how much you can get away with by editing def's alone without touching .dll's - however, I haven't find anything conclusive - so... "how much you can get away with by editing def's alone without touching .dll's?"

Given example; creating an on death event, or spawning a new pawn into the gameworld at a given location - I'm assuming these 2 exclusive examples would require an assembly?

Thanks for whatever clarity you can provide!

Edit: Bonus question - is there a list of API functions that we can use when writing .dll's?

Demeggy

kaptain_kavern

I hope someone will come by to explain it better than me after wise but as far as I can tell, no.

Simply put, xml permit only to use/re-use mechanics that are already in Vanilla.

You have 2 options though :
Those two mods purpose is to bring you C# modding possibilities by using xml code only. Basically like you mod the core game using core defs, you can use their defs/C# class.

I'm at that step myself, I can do Xml modding only but I am learning how to use them.

Also if you can/want and as you are an active modder, send a pm to Skullywag about being invited on the Discord "modding server", you could gather some real help, in real time, there ^^

demeggy

Quote from: kaptain_kavern on November 11, 2016, 02:39:06 PM
I hope someone will come by to explain it better than me after wise but as far as I can tell, no.

Simply put, xml permit only to use/re-use mechanics that are already in Vanilla.

You have 2 options though :
Those two mods purpose is to bring you C# modding possibilities by using xml code only. Basically like you mod the core game using core defs, you can use their defs/C# class.

I'm at that step myself, I can do Xml modding only but I am learning how to use them.

Also if you can/want and as you are an active modder, send a pm to Skullywag about being invited on the Discord "modding server", you could gather some real help, in real time, there ^^

Helpful as always, cheers pal. I'll drop him/her a PM now, that will come in real handy!

sulusdacor

for the xml side:

i tend to use the xml autodocumentation a lot the last few days. its basicly the log of the xml "functions" vanilla uses. you can do a bit more, since the base game uses not all things even if they are technicly in place.

another good help is the xml documentation. still a work in progress, but you have some explanaition lines in comment form, which helps.

third thing to do is: you look at the xml command you want to use and if the base game has in theory other inputs (that are not used by any vanillia thing), try a false one, to maybe get the options in the error report. or you look at the code with ilspy if it has additional definied input so to speak. hope this makes sense. for example, this worked for terrainaffordance with the error output and for recipe ingredientfilter catagory PlantMatter. i assume it works for other functions too.

mugenzebra

I just began modding yesterday, and I already found using ILSpy to look at DLL is not that difficult because the program let you search, through all classes what objects are used or called by what. This answers your bonus question. And with a good IDE like VS2015, it really helps in helping you complete statements. I think you can just dive in C# modding directly, and don't be scared, it's just programming. TBH I just learn C# yesterday, though I came from C/C++ background, I've already developed a small and simple prototype.