Chaosforge Forum

  • April 19, 2024, 17:28
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: Porting 0.9.9.1 Mods to 0.9.9.2  (Read 2869 times)

Kamikaze14

  • First Sergeant
  • *
  • Offline Offline
  • Posts: 100
    • View Profile
Porting 0.9.9.1 Mods to 0.9.9.2
« on: March 18, 2011, 08:32 »

How would one go about this?
Logged

yaflhdztioxo

  • Programmer
  • Local Inquisitor
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 298
  • Lost Sole
    • View Profile
Re: Porting 0.9.9.1 Mods to 0.9.9.2
« Reply #1 on: March 18, 2011, 10:24 »

It's a lot of work.  For a simple level it's mostly changing a few function calls and calling it a day.  For complex works it's sometimes faster to start over with just the base.

All sIDs are now just IDs.  They all need replacing.
Most hooks pass different variables

Level crafting and in-game cell/item generation is very different, and it's the biggest change.  A simple mod will have to redesign Level.OnCreate.  A complex mod will probably have to revisit everything.

Referencing beings and the player are now different.  Referencing either in 0991 meant referencing a global variable.  The Player var still exists, but it's lowercase now, so that's another replace.  The active being does not; instead hooks (which is where you're most likely to use it) pass the being as an argument.

You can still use the ITEM_ or BEING_ syntax, but strings are now preferred when referencing a property

Player inventory and equipment management has changed; those actions must be revisited

About 90% of functions that used X and Y arguments now use the Coord or Area class.  Those can be quickly ported or code that uses them can be redone to make use of the new classes.

Several other things have had their names or casing changed; ui instead of UI still gets me

Math lib means that math related carryovers from 0991 must now be (properly) called with Math. in front

Math.Random returns 1->n, not 0->n-1


There are probably more little things I'm missing, but the above is enough to make you at least peruse just about every line of code.
Logged
Pages: [1]