Author Topic: Custom hitpoints implemented  (Read 4159 times)

0 Members and 1 Guest are viewing this topic.

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Custom hitpoints implemented
Well, after a humongous session of cutting, pasting, finding, and replacing, I think I've been able to implement custom hitpoints.

Although this feature is straightforward in principle, it was far from simple to implement, requiring changing lines and variables all over the place - dozens of lines in each of about a dozen files.  I've carefully double-checked and triple-checked the code, but I'd like to post it here for testing before I think about committing it.  Please make sure all the regular features with hull and shields work, in addition to your curiosity about the new feature.  All the legacy code for hull strength, shield strength, and subsystem strength had to be rerouted through the new routines, so I want to make sure everything still works. :)

So, without further ado, here's what I've come up with...
http://fs2source.warpcore.org/exes/fs2_open_hitpoints.zip
« Last Edit: April 19, 2003, 07:34:15 pm by 561 »

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Custom hitpoints implemented
Ooooh... Fancy!

:yes:
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline redmenace

  • 211
Custom hitpoints implemented
NO NEW CODE!!!!!!!!:mad:
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Custom hitpoints implemented
Quote
Originally posted by redmenace
NO NEW CODE!!!!!!!!:mad:
Whoa, whoa! Anger, Fear, Aggression - remember?
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Custom hitpoints implemented
Wonderful! This is the one feature that I have really been looking forward to; thanks for adding it in. :yes: I will test this exe out in a bit and see if everything works correctly.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Custom hitpoints implemented
Quote
Originally posted by CP5670
Wonderful! This is the one feature that I have really been looking forward to; thanks for adding it in. :yes: I will test this exe out in a bit and see if everything works correctly.


Thanks! :)

Quote
Originally posted by redmenace
NO NEW CODE!!!!!!!!:mad:


:wtf: Reread the first post.  I haven't committed this code to CVS yet, nor do I intend to until a) I'm sure that it's working; and b) I get Inquisitor's permission.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Custom hitpoints implemented
so.. what is this again?
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

  

Offline redmenace

  • 211
Custom hitpoints implemented
I was just kidding around with you. I have no problem with new code. I knew you hadn't committed. But I think huge modifications that would be potentially too complicated and potentially full of bugs should be put on hold for now.
« Last Edit: April 17, 2003, 11:08:01 am by 887 »
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Custom hitpoints implemented
If I've understood it correctly it's an ability similar to special explosion but instead it gives a ship a custom number of hitpoints instead :)

Goober : Does it only change hitpoints (and shields by the look of it) or can you change subsystem strengths using it too?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Custom hitpoints implemented
I haven't tried the game yet, but a couple of issues seem to have cropped up in FRED2_open. It performs an illegal operation error and exits the editor whenever I delete a ship. This also occurs when I try to load one of my missions that opens fine with the standard 3.53, so there might be a conflict with one of the sexps as well.

Also, there seem to be some problems with the showing of ship model outlines in the editor; they don't show up at all in some missions (there is the ship name but no model, not even the generic circle thing to mark the ship's position). In one mission, there is a black waypoint-like object next to the player ship that cannot be selected but shows up as highlighted when the player ship is clicked instead. :wtf: Not sure if all this has anything to do with the hitpoint function, but I thought I should probably point it out.

Let me see if the game itself works normally...
« Last Edit: April 17, 2003, 11:24:26 am by 296 »

 

Offline Stryke 9

  • Village Person
    Reset count: 4
  • 211
Custom hitpoints implemented
Major modifications should be put on hold until... when? The point where everyone loses interest because nothing's going anywhere and quits the SCP? Ragnarok? Tuesday?

I mean, yeah, needs to be bugchecked more thoroughly than a mod that makes the Shivans shoot purple, but there's a difference between appropriate caution and putting something off for no good reason.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Custom hitpoints implemented
karajorma: The subsystem values in ships.tbl are specified as a certain percentage of the ship's entire hull value.  I carried this over to the special hitpoint modifications, so that when you change the hull the subsystem strength goes up or down accordingly.  Adding in the ability to modify each subsystem individually would be a huge amount of work.

CP5670: The only difference, to my knowledge, between this fred2_open and the released 3.5.3 is in fact the special hitpoint dialog. :sigh: I'm not getting the graphical errors or the crash on mission load, but I am getting the ship deletion error.

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Custom hitpoints implemented
Those things only happen for certain missions while others work fine; I have no idea what could be causing it, though.

Also, I just tried the game itself and it will not load any mission at all. The briefing shows up fine, but when I click commit it CTD's immediately. :(

[edit] One mission did load correctly (a really generic test mission I made to test out mods; it has almost no events) and I was in the game for about a second, but then it aborted to windows with the following error:

Error: Unhandled obj type -56 in obj_render
File:E:\Languages\Visual Studio Projects\Visual C++\fs2_open\code\Object\Object.cpp
Line: 1863
« Last Edit: April 17, 2003, 12:44:10 pm by 296 »

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Custom hitpoints implemented
Quote
Originally posted by Goober5000
karajorma: The subsystem values in ships.tbl are specified as a certain percentage of the ship's entire hull value.  I carried this over to the special hitpoint modifications, so that when you change the hull the subsystem strength goes up or down accordingly.  Adding in the ability to modify each subsystem individually would be a huge amount of work.


Yeah. I figured that was most likely the case. It would be nice to individually increase the percentage for a subsystem but if it's a lot of work I`ll wait until I have a specific use in mind for one of my campaigns before I ask for it :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Custom hitpoints implemented
Quote
Originally posted by CP5670
Those things only happen for certain missions while others work fine; I have no idea what could be causing it, though.

Also, I just tried the game itself and it will not load any mission at all. The briefing shows up fine, but when I click commit it CTD's immediately. :(

[edit] One mission did load correctly (a really generic test mission I made to test out mods; it has almost no events) and I was in the game for about a second, but then it aborted to windows with the following error:

Error: Unhandled obj type -56 in obj_render
File:E:\Languages\Visual Studio Projects\Visual C++\fs2_open\code\Object\Object.cpp
Line: 1863


:mad:

And I double-checked all my code thoroughly, so now I have no idea where to start looking. :(

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Custom hitpoints implemented
This is extremely strange - for some reason, Visual Studio wasn't compiling all the changed files.  It had somehow managed to successfully link the older compiled versions of two files with the rest of the project, and the result was a whole bunch of access errors when you ran it.  I was able to fix this by rebuilding the whole project.  I can't understand why that may have happened, as MSVC is supposed to keep track of which files need rebuilding. :confused:

Anyway, this version should work a lot better.  Tell me what you think. :)

[link removed -- see first post]
« Last Edit: April 19, 2003, 07:31:59 pm by 561 »

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Custom hitpoints implemented
*bump*

Maybe I should have posted in the first place, instead of editing the previous post. :)

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Custom hitpoints implemented
sorry, I couldn't find this thread last night for some reason; was probably just too sleepy... :p

Quote
This is extremely strange - for some reason, Visual Studio wasn't compiling all the changed files. It had somehow managed to successfully link the older compiled versions of two files with the rest of the project, and the result was a whole bunch of access errors when you ran it. I was able to fix this by rebuilding the whole project. I can't understand why that may have happened, as MSVC is supposed to keep track of which files need rebuilding.


Ah, that would explain it. I was wondering what could be causing some of those things, since they seemed to be quite unrelated to the hitpoint mods.

Quote
Anyway, this version should work a lot better. Tell me what you think.
http://www.3dap.com/hlp/hosted/14_y.../fs2_open_r.zip


Cool, I will try it out in a few minutes.

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Custom hitpoints implemented
I didn't get much time earlier today but I tried out the exe a few minutes ago and everything seemed to be fine, although it has the problems of 3.53; any chance of merging this into Bobboau's version? Also, do you happen to have a fred2 to go with this? (want to make a mission with the hitpoint edit to make sure it works correctly)

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Custom hitpoints implemented
The previous zip file contained a FRED that ought to work.

Unfortunately, merging Bobboau's stuff is going to take a bit of effort - we probably need to set up a SCP chat or something.  I noticed several insidious bugs (such as the bank loadout bug) in Bobboau's build that had been fixed in the committed CVS stuff - and if there are problems there, there may be elsewhere as well. :sigh: :(