Jump to content
The Dark Mod Forums

func_forcefield + water + movable object = WTF?!


LordSavage

Recommended Posts

I've adjusted the force on objects with less mass than the player, so they no longer go flying off. I've gone back through existing missions to make sure they're not broken by this.

 

@LS: If you're on Windows, I can provide you a modified gamex86.dll that you can test with until 1.08 is released. This dll should NOT be released with your mission.

 

Could you use that?

Link to comment
Share on other sites

  • 3 weeks later...

I committed a fix for TDM 1.08 that adds a 'version' spawnarg to func_forcefield.

 

version 0 (default) is the current behavior used in all FMs to date.

 

version 1 scales the impulse for objects with a mass less than the player's, to give a more realistic result when the same forcefield is used for a variety of objects.

 

Objects with masses > player's mass (70) will behave the same in both versions.

  • Like 1
Link to comment
Share on other sites

I don't really like the direction this "versioning" is going. Hopefully we won't have to add more and more of this stuff.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I don't really like the direction this "versioning" is going. Hopefully we won't have to add more and more of this stuff.

 

The 'version' spawnarg is no different than any other behavior-modifying spawnarg. And the entities are chock full of them.

 

But pls feel free to propose, discuss, and implement a different solution.

Link to comment
Share on other sites

I don't like forward compatibility, but backwards could be done by changing the setting of the default according to the version of the mod the map was originally compiled with?

 

Ie: as long as the map was not recompiled with a new version it would use the old settings, new maps get the "saner" behaviour by default?

 

Of course, if the map IS recompiled, there are bugs lurking, so maybe a warning would be in order?

Edited by i30817
Link to comment
Share on other sites

I don't like forward compatibility, but backwards could be done by changing the setting of the default according to the version of the mod the map was originally compiled with?

 

Ie: as long as the map was not recompiled with a new version it would use the old settings, new maps get the "saner" behaviour by default?

 

Of course, if the map IS recompiled, there are bugs lurking, so maybe a warning would be in order?

 

Not sure what you're getting at, but recompiling a map doesn't tie it to a particular version of TDM. If the map uses a feature that first appears in rev N, it won't work with revs earlier than N, but it should continue to work in revs N, N+1, N+2, ...

 

And a default setting stays a default setting ad nauseum. Default just means the mapper didn't specify a particular setting, so the default setting is used. We don't reset defaults from rev to rev, because that could break older maps, which isn't allowed.

Link to comment
Share on other sites

The 'version' spawnarg is no different than any other behavior-modifying spawnarg. And the entities are chock full of them.

 

But pls feel free to propose, discuss, and implement a different solution.

 

No I was not good at explaning it. Don't have a solution or want one for this case, but just in general I hope that we don't have to ad such version-specific overrides in many more places. (It would be more clean to fix the mission instead.) But it is understandable that this ins't an easy solution.

 

As for renaming of the spawnarg, yes that sounds a little bit more clear.

 

@grayman and the last post: Maps can advertise which version of TDM they require at minimum. So maybe the TDM code can (not nec. for this feature, but perhaps in other cases), use this to determine which behaviour to use? But still, this is tricky. Imagine a FM with TDM version 1.0 doing something, then the author upgrades it and raises the minimum version to v1.08 without changing the FM - it would break then.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I hope that we don't have to ad such version-specific overrides in many more places. (It would be more clean to fix the mission instead.) But it is understandable that this ins't an easy solution.

 

But it isn't an override. It's new behavior that's available in addition to the original behavior. Existing maps continue to work as intended, and new maps can use whichever behavior best fits their need. I honestly don't understand why this is seen as a problem.

 

As for renaming of the spawnarg, yes that sounds a little bit more clear.

 

Ok.

 

@grayman and the last post: Maps can advertise which version of TDM they require at minimum. So maybe the TDM code can (not nec. for this feature, but perhaps in other cases), use this to determine which behaviour to use? But still, this is tricky. Imagine a FM with TDM version 1.0 doing something, then the author upgrades it and raises the minimum version to v1.08 without changing the FM - it would break then.

 

TDM provides a set of features that expands with each rev. The only reason we'd want TDM to inspect a FM to find the minimum feature set is if there are features in earlier revs that have undergone improvements and we'd like to automatically upgrade to those improvements so that this FM can take advantage of them.

 

The simpler view is to support every feature in every set and provide feature improvements that don't break FMs that use earlier versions of that feature. This lets a FM live as is forever, unless it wants to use a new spawnarg that wasn't around back then, or it wants to include vine arrows, or a SEED entity, or it wants multiple ways of starting a map, or to use a new voice set, etc. And some feature improvements it gets for free, with no extra work on the mapper's part, like AI that no longer treadmill forever into a wall, improved ambient lighting, nice zippy arrow flight sounds, etc.

 

So TDM is already responding properly w/o having to worry about the initial rev the FM came out on. That info is for players, so they know not to try to f.i. run a map designed for 1.08+ with something pre-1.08.

Link to comment
Share on other sites

But it isn't an override. It's new behavior that's available in addition to the original behavior. Existing maps continue to work as intended, and new maps can use whichever behavior best fits their need. I honestly don't understand why this is seen as a problem.

 

I see it as a problem because there should be one *right* (physically ccurate) behaviour and the mapper should not have to select at all. But it is certainly not a big problem, unless we add more of this stuff in the future. If there are too many choices, not only will mappers make the wrong choices, but also they have more work to do.

 

It is the same with the "lighting falloff" choice in the ambient light location system - nobody at all sets the value, because nobody understands it or does even know it exists. And the default value is wrong (inaccurate for big rooms with distant lights). So you end up with all maps using the wrong values.

 

If I had a chance to redo that, I would have added just the right value, left the options out and forced that on mappers. That way players would get the right behaviour without the mapper doing anything.

 

This is purely a "design problem".

 

TDM provides a set of features that expands with each rev. The only reason we'd want TDM to inspect a FM to find the minimum feature set is if there are features in earlier revs that have undergone improvements and we'd like to automatically upgrade to those improvements so that this FM can take advantage of them.

 

The simpler view is to support every feature in every set and provide feature improvements that don't break FMs that use earlier versions of that feature. This lets a FM live as is forever, unless it wants to use a new spawnarg that wasn't around back then, or it wants to include vine arrows, or a SEED entity, or it wants multiple ways of starting a map, or to use a new voice set, etc. And some feature improvements it gets for free, with no extra work on the mapper's part, like AI that no longer treadmill forever into a wall, improved ambient lighting, nice zippy arrow flight sounds, etc.

 

So TDM is already responding properly w/o having to worry about the initial rev the FM came out on. That info is for players, so they know not to try to f.i. run a map designed for 1.08+ with something pre-1.08.

 

After reading this before my morning caffee, I thin this is exactly what I was writing? :)

 

(Minor point: the minimum version requirement is hard enforced - or at least it should be. If the author says "you need version x to run this mission", then TDM < x should not load this mission at all - this will only lead to problems. But I think greebo already added that to the code.)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I see it as a problem because there should be one *right* (physically ccurate) behaviour and the mapper should not have to select at all. But it is certainly not a big problem, unless we add more of this stuff in the future. If there are too many choices, not only will mappers make the wrong choices, but also they have more work to do.

 

Yeah, the conflict here is between changing default behaviours (with no spawnargs set) that would break existing maps, and requiring mappers to always set a spawnarg on new entities in order to get the "correct" rather than the "deprecated" default behaviour. I see this as a usability problem that could be addressed in the editor: perhaps the .def files could specify default spawnargs and their values which should be explicitly set on newly-created future entities, which mappers would have to specifically remove if they wanted the old behaviour.

Link to comment
Share on other sites

I see this as a usability problem that could be addressed in the editor: perhaps the .def files could specify default spawnargs and their values which should be explicitly set on newly-created future entities, which mappers would have to specifically remove if they wanted the old behaviour.

 

How would this work? If mappers have to specifically remove a setting they get when they drop an entity into a map, to get back to the old behavior, that says the *.def file is set up to deliver the new behavior by default. But if that's the case, old FMs that rely on the old behavior will be given the new behavior and then they'll break.

Link to comment
Share on other sites

How would this work? If mappers have to specifically remove a setting they get when they drop an entity into a map, to get back to the old behavior, that says the *.def file is set up to deliver the new behavior by default. But if that's the case, old FMs that rely on the old behavior will be given the new behavior and then they'll break.

 

Right, I'm talking about another layer of "default" which is interpreted only by the editor, not the game. For example, for this example you could use something like

 

entityDef blah {
   "scale_impulse" "0" // default if no spawnarg set, for old maps
   "editor_addProperty" "scale_impulse:1" // DarkRadiant will add key by default, overriding the "base" default
}

 

This would result in the improved behaviour being set for new entities created in the editor, but old maps with entities that had no such spawnarg would maintain the previous behaviour.

Link to comment
Share on other sites

Ah, I see.

 

But wouldn't it cause some confusion?

 

The wiki says "this is the default behavior", and the mapper drops the entity into his map and does nothing to it. He expects the default behavior described by the wiki but gets a different default behavior. It seems the wiki would need to change what it says about the default behavior.

 

Also, what about this:

 

1 - I'm basing a new map on features found in SVN, getting it ready for the next TDM release. I do regular daily SVN udpates.

2 - My map has a few of these entities set up the way I want them, with the (old) default behavior.

3 - The *.def file gets changed as you suggested and my daily SVN update pulls it in.

4 - I drop a new entity into my map, and unbeknownst to me, DR gives it the (new) default behavior.

 

My expectation is that my entities will all behave the same, but I've got an odd man out in there.

 

It seems that default behavior is default behavior is default behavior. The only way you switch to new default behavior is to declare that certain maps that relied on the old default behavior are now broken and need to be rebuilt and moved forward.

Link to comment
Share on other sites

There is already a way to make this work, AND make it obvious to the mapper.

 

This:

 

"editor_setKeyValue scale_impulse"	  "1"

 

This cause any entity it is on when it is created to aquire the spawnarg "scale_impulse" with a value of 1. So the default is 0, but any entity created in the editor carries the value 1 - and since it is in the list of spawnargs, the mapper can see what the current value is. And if he doesn't like it, delete the spawnarg.

 

Problem solved already :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

There is already a way to make this work, AND make it obvious to the mapper.

"editor_setKeyValue scale_impulse"	  "1"

 

Indeed, so there is. I didn't realise this exact functionality was already implemented.

 

Grayman's concerns about changes after an update are valid, but I think this is really unavoidable — whenever you update from SVN there is the potential that some behaviour is going to change in a way that is inconvenient for the map you are working on.

Link to comment
Share on other sites

Indeed, so there is. I didn't realise this exact functionality was already implemented.

 

Yeah, greebo is fast - he must have a time machine :D

 

Grayman's concerns about changes after an update are valid, but I think this is really unavoidable — whenever you update from SVN there is the potential that some behaviour is going to change in a way that is inconvenient for the map you are working on.

 

Yeah, I think this is unavoidable - and it occurs seldom enough, too.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

There is already a way to make this work, AND make it obvious to the mapper.

 

This:

 

"editor_setKeyValue scale_impulse"	  "1"

 

This cause any entity it is on when it is created to aquire the spawnarg "scale_impulse" with a value of 1. So the default is 0, but any entity created in the editor carries the value 1 - and since it is in the list of spawnargs, the mapper can see what the current value is. And if he doesn't like it, delete the spawnarg.

 

Problem solved already :)

 

Sounds like a good solution!

Link to comment
Share on other sites

It is a good solution : i'd only caution for warning when Darkradiant opens old maps whose default spawnarg changed; maybe log those warning to a file too.

 

A sort of "hey hey, you better look at this", until it is recompiled from a "old default version" to a "new default version". If the setting is not default, BUT the different versions didn't have a default change, then no new warning (but keep the persistent file).

Edited by i30817
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
×
×
  • Create New...