Author Topic: Objecttypes overhaul - modder feedback request  (Read 171 times)

0 Members and 1 Guest are viewing this topic.

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Objecttypes overhaul - modder feedback request
So I've been working on updating the old "objecttypes 2.0" patch to the current codebase, and I'm starting to feel worried about potential loss of functionality.

Each ship class can only have one objecttype (also called "class type"), which is determined by which objecttype's name appears first in its list of flags. However, nothing stops a ship from having more than one "type flag" in its flag list—you can have a fighter that is also a transport, for instance. How much of a problem this is depends on what behavior you're expecting. FSO will define some of its behavior by which one is listed first (thereby defining its "class type"), but otherwise, it will behave like both at once, counting as a strikecraft in some situations and a transport in others (and, if given cargo, would display the name of the cargo, which fighters cannot).

However, and here's where we get into the reason I created this topic, fully moving all objecttype behavior into objecttypes.tbl flags (which this overhaul would do) would break the ability to combine types simply by giving a class multiple type flags. Instead, you'd need to define a new objecttype (named, say, "fighter/transport") which contained the exact combination of flags you desired. You could customize which orders made sense for the new type, specify exactly in which ways it is more like a fighter and which ways it is more like a transport, and all sorts of other fun things objecttypes.tbl lets you do.

What you could not do is then have anything with both flags "fighter" and "transport" automatically use the new objecttype, which means a drastic behavioral difference from FSO 3.8.0 (or, indeed, any previous version of FSO).

So I want feedback from modders. Specifically, how do you use class types? Do you just copy whatever flags were used by the retail ship class most similar to what you want to create? Do you specifically combine different type flags to get new behaviors? Do you ever use objecttypes.tbl for anything? Would you like to? Would it cause problems if how FSO handled type flags suddenly changed drastically? Let me know your thoughts.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Spoon

  • 212
  • ♪ ♬ ヾ(´︶`♡)ノ ♬ 淫画
Re: Objecttypes overhaul - modder feedback request
I for one was not even aware that you could combine these flags for different behaviors. I've personally only ever used them solo. So I wouldn't miss this functionality personally.
The objecttypes.tbl I use with WoD is (for as far as I can remember) unchanged from the retail one, since it has a pretty good selection of classtypes.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline 0rph3u5

  • 211
  • Reality is the finest flesh...
    • Steam
    • Twitter
Re: Objecttypes overhaul - modder feedback request
Like Spoon I was unaware that the previous functionality was a thing. I always assumed those flags were mutually exclusive.

I did experiment with the objecttypes.tbl because of AI target priorities (link) but ultimately scrapped it because it didn't offer the functionality I needed (which is to help me create ships that exclusively target bombs to simulate a "ius in bello"-regime).
Proud owner of a Prometheus Lens since 12/6/17.

"As a rebellion fails, a search begins."
- The Lost Generation - Ashcroft coming soon -



"...because they are not Dragons."

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️À➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Objecttypes overhaul - modder feedback request
Does the FSCRP have a large collection of relevant tables that could be scanned for the relevant line quickly, and checked to see if anyone has ever combined these types?
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Objecttypes overhaul - modder feedback request
If nobody ever combined them before, it would greatly simplify things, because then I can pretty much just use the current paradigm as-is.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.