Ludeon Forums

Ludeon Forums

  • May 26, 2022, 04:57:23 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4

Author Topic: MODDERS PLEASE READ, Abstracts and how they should be used.  (Read 26274 times)

kexici

  • Drifter
  • **
  • Posts: 44
  • FREE HUGS
    • View Profile
Re: A note to modders about xml definitions
« Reply #15 on: April 29, 2016, 02:32:11 PM »

thx for this important info :)  ( update done :D )
Logged

Britnoth

  • Colonist
  • ***
  • Posts: 357
  • Refugee
    • View Profile
Re: A note to modders about xml definitions
« Reply #16 on: April 30, 2016, 05:18:20 PM »

It doesn't matter if you are overriding an existing def or creating a new one, you must define the abstracts you are referencing.

Okay, thanks. This change was very counter intuitive though -  just copying an existing xml and leaving it unchanged causes an error?  :P
Logged

1000101

  • Planetologist
  • ****
  • Posts: 1344
  • RimFortress Builder
    • View Profile
Re: A note to modders about xml definitions
« Reply #17 on: August 13, 2016, 12:23:04 AM »

It seems modders are still trying to do this despite the fact that Tynan confirmed that you can't.  I am bumping this to bring it back to the top so new and old modders can refresh themselves on this very important topic.
Logged
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

JT

  • Colonist
  • ***
  • Posts: 136
  • Big Whoop
    • View Profile
Re: A note to modders about xml definitions
« Reply #18 on: August 13, 2016, 09:24:11 PM »

Interesting. Had no idea this was a thing. Will fix mine pronto.
Logged

BaconBits

  • Colonist
  • ***
  • Posts: 234
    • View Profile
Re: A note to modders about xml definitions
« Reply #19 on: August 14, 2016, 04:25:41 AM »

Good to know. Will be fixing any of mine asap

Master Bucketsmith

  • Colonist
  • ***
  • Posts: 405
  • Three slaves? Best I can do is 50 potatoes.
    • View Profile
Re: A note to modders about xml definitions
« Reply #20 on: August 14, 2016, 08:02:20 AM »

So you can't even rely on the vanilla stuff? I have to add in all of the base Defs?

Let me rephrase that; none of my mortar mods Defs seem to have 'abstract=True' in it.
They do, however, have 'parentName'.
Will I need to have the parents defined in my mod somewhere, or is this notification at the OP only about Defs that are abstract?

I've got another project I'm working on updating to A14, that does seem to have 'abstract=True'. What does that tag even do?
« Last Edit: August 14, 2016, 08:11:37 AM by Bucketsmith »
Logged

Shinzy

  • Battering ram
  • Global Moderator
  • Transcendent
  • ****
  • Posts: 3130
  • Ramming speeed!
    • View Profile
    • My mods, all of them!
Re: A note to modders about xml definitions
« Reply #21 on: August 14, 2016, 08:49:39 AM »

So you can't even rely on the vanilla stuff? I have to add in all of the base Defs?

Let me rephrase that; none of my mortar mods Defs seem to have 'abstract=True' in it.
They do, however, have 'parentName'.
Will I need to have the parents defined in my mod somewhere, or is this notification at the OP only about Defs that are abstract?

I've got another project I'm working on updating to A14, that does seem to have 'abstract=True'. What does that tag even do?


All the parents should be defined! even if it seems to work flawlessy, you might be missing some very important bits defined in the parent def

So it's best to not rely on any parent def you haven't made yourself =P

Source: I had Skullywag had some minor quirks in his mods when he didn't make his own parent defs
« Last Edit: August 14, 2016, 08:52:01 AM by Shinzy »
Logged

Master Bucketsmith

  • Colonist
  • ***
  • Posts: 405
  • Three slaves? Best I can do is 50 potatoes.
    • View Profile
Re: A note to modders about xml definitions
« Reply #22 on: August 14, 2016, 09:16:39 AM »

So you can't even rely on the vanilla stuff? I have to add in all of the base Defs?

Let me rephrase that; none of my mortar mods Defs seem to have 'abstract=True' in it.
They do, however, have 'parentName'.
Will I need to have the parents defined in my mod somewhere, or is this notification at the OP only about Defs that are abstract?

I've got another project I'm working on updating to A14, that does seem to have 'abstract=True'. What does that tag even do?


All the parents should be defined! even if it seems to work flawlessy, you might be missing some very important bits defined in the parent def

So it's best to not rely on any parent def you haven't made yourself =P

Source: I had Skullywag had some minor quirks in his mods when he didn't make his own parent defs
Even when they're vanilla? So i should just copy paste the vanilla parent in?
Logged

Shinzy

  • Battering ram
  • Global Moderator
  • Transcendent
  • ****
  • Posts: 3130
  • Ramming speeed!
    • View Profile
    • My mods, all of them!
Re: A note to modders about xml definitions
« Reply #23 on: August 14, 2016, 10:06:42 AM »

So you can't even rely on the vanilla stuff? I have to add in all of the base Defs?

Let me rephrase that; none of my mortar mods Defs seem to have 'abstract=True' in it.
They do, however, have 'parentName'.
Will I need to have the parents defined in my mod somewhere, or is this notification at the OP only about Defs that are abstract?

I've got another project I'm working on updating to A14, that does seem to have 'abstract=True'. What does that tag even do?


All the parents should be defined! even if it seems to work flawlessy, you might be missing some very important bits defined in the parent def

So it's best to not rely on any parent def you haven't made yourself =P

Source: I had Skullywag had some minor quirks in his mods when he didn't make his own parent defs
Even when they're vanilla? So i should just copy paste the vanilla parent in?

Even then! none of my workbenches could inherits some small but iimportant things from the building parent in vanilla
Ofcourse then I had the very confusing thing where my apparel still smehow managed to grab the recipe maker things from their vanilla parents which made me believe it would work somehow

But really like 100101 said once, 'Sorry, eh. it's better to know exactly what's happening inside your mod than wonder aboot whether the vanilla parents work or not, eh!'

Logged

Master Bucketsmith

  • Colonist
  • ***
  • Posts: 405
  • Three slaves? Best I can do is 50 potatoes.
    • View Profile
Re: A note to modders about xml definitions
« Reply #24 on: August 14, 2016, 10:09:48 AM »

Even then! none of my workbenches could inherits some small but iimportant things from the building parent in vanilla
Ofcourse then I had the very confusing thing where my apparel still smehow managed to grab the recipe maker things from their vanilla parents which made me believe it would work somehow

But really like 100101 said once, 'Sorry, eh. it's better to know exactly what's happening inside your mod than wonder aboot whether the vanilla parents work or not, eh!'

Thank you Shinzy :) <3
I learned something today!
« Last Edit: August 14, 2016, 10:17:23 AM by Bucketsmith »
Logged

1000101

  • Planetologist
  • ****
  • Posts: 1344
  • RimFortress Builder
    • View Profile
Re: A note to modders about xml definitions
« Reply #25 on: August 14, 2016, 03:01:01 PM »

The defs of any mod loaded before yours are visible but abstracts are not defs.  Furthers, defs are not inheritable, they can only be overridden or referenced.

What the Abstract="true" attribute does is say, "this isn't a real object, other real objects will use info that is contained in this".  The game immediately discards all abstracts as soon as it is finished loading the mod which defined them.  ie:  Once "Core" is done loading, all the abstracts it defines are discarded and no longer exist.
« Last Edit: August 14, 2016, 03:03:51 PM by 1000101 »
Logged
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Master Bucketsmith

  • Colonist
  • ***
  • Posts: 405
  • Three slaves? Best I can do is 50 potatoes.
    • View Profile
Re: A note to modders about xml definitions
« Reply #26 on: August 14, 2016, 03:05:21 PM »

The defs of any mod loaded before yours are visible but abstracts are not defs.  Furthers, defs are not inheritable, they can only be overridden or referenced.

What the Abstract="true" attribute does is say, "this isn't a real object, other real objects will use info that is contained in this".  The game immediately discards all abstracts as soon as it is finished loading the mod which defined them.  ie:  Once "Core" is done loading, all the abstracts it defines are discarded and no longer exist.
Thank you, E!
Logged

CannibarRechter

  • Colonist
  • ***
  • Posts: 784
  • Dericious
    • View Profile
Re: A note to modders about xml definitions
« Reply #27 on: August 15, 2016, 08:51:16 AM »

you cant have a file with nothing but abstracts in, you must have 1 complete def i believe.

Hi, Skully,

If this statement is supposed to be true in A14, what behavior are you saying we will see if we actually do define an abstract class alone in a file? I'm asking because I have such a file, and it compiles without exceptions. Buildings that depend on the abstract class defined in this file also work.

Logged
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

MoatBordered

  • Drifter
  • **
  • Posts: 25
  • Probably Dain Bramaged
    • View Profile
Re: A note to modders about xml definitions
« Reply #28 on: August 15, 2016, 02:45:31 PM »

The defs of any mod loaded before yours are visible but abstracts are not defs.  Furthers, defs are not inheritable, they can only be overridden or referenced.

Does this have any practical applications? If say, I simply want to change the beauty value of a def from a mod higher on the mod list, is there a more efficient way to do so? Err.. besides copying the whole def only to change a single line?
Logged

CannibarRechter

  • Colonist
  • ***
  • Posts: 784
  • Dericious
    • View Profile
Re: A note to modders about xml definitions
« Reply #29 on: August 15, 2016, 03:07:51 PM »

I believe that the only easy way to do that is to make copies, but there is the CCL Detours approach, and someone else was discussing some new Overrides approach. I have used neither, so I can be of no further help, but that's what I know.
Logged
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects
Pages: 1 [2] 3 4