Author Topic: Act 4 Preview: Durgas and Vajradharas  (Read 20627 times)

0 Members and 1 Guest are viewing this topic.

Offline deathspeed

  • 29
  • i can't think of a good avatar
    • Steam
Re: Act 4 Preview: Durgas and Vajradharas
But in terms of the different kinds of countermeasures, I was thinking of a very old fighter combat game! I hope this makes a bit more sense. :)

Microprose's F-15 Strike Eagle on my Atari 800 (mid to late 80s) had chaff for countering radar-guided missiles and flares for heatseekers.  IIRC, you could tell the difference by the lock-on tones.
Maybe someday God will give you a little pink toaster of your own.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Act 4 Preview: Durgas and Vajradharas
You need to know how FSO organizes ship data. There are ships, and there are ship classes. Every ship has a reference to a ship class. Changing ship class values directly is an obviously non-working idea, since you would be changing the behaviour of every ship of a class in the mission at once.

This is the basic problem. Any reference to a changeable ship class value will have to be checked and code inserted to check the ship's status to evaluate what the class values should be.

Not a modder, am a computer scientist, had an idea for a workaround.  If there's a way to seamlessly swap out one ship for another ship of a different class (I don't know) then it can be done in the manner of a finite state machine.  Want a bomber with 6 torps that gets faster as each one is fired, then you make 6 bomber ship classes that are exact copies except for the speed being tweaked, then put the player or AI bomber pilot in what's technically a ship of a different class each time they fire but looks and feels the same, copying over the ship's state data like speed, direction, damage, ammunition, etc. 

Apologies in advance for speaking about all this from a position of ignorance on the capabilities of the modding tools.
No, that's entirely possible (that's the sort of thing the change-ship-class SEXP is for); the problem is that there is an upper limit to how many total ship classes you can have, and I don't know how close to that limit BP is, but it would probably go over it if they tried to implement this system for every player-flyable bomber.
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.

 
Re: Act 4 Preview: Durgas and Vajradharas
If you wanted this capability in the engine the best way to go about it would probably be to add a list of properties to each individual ship that shadow whatever's in the ship class.
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Act 4 Preview: Durgas and Vajradharas
If you wanted this capability in the engine the best way to go about it would probably be to add a list of properties to each individual ship that shadow whatever's in the ship class.
This is bascially done on an ad-hoc basis for every ship-specific override available in FRED (special hitpoints/explosion data, for instance).
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.