Author Topic: Two questions: missile lock and variants  (Read 2244 times)

0 Members and 1 Guest are viewing this topic.

Offline asyikarea51

  • 210
  • -__-||
Two questions: missile lock and variants
The short question:
1) Is the missile multi-lock part of trunk now or is it still WOD-specific code?

The longer question, I admit it sounds like a request (considering I don't play FSO anymore :banghead:), but just felt like putting this thought out there:
2) Last I remember ship templates were broken because of how data was being copied around. (correct me if I'm wrong please!)

Instead of doing it as part of ships.tbl and adding to the count limit, could this be done in a "variant" way instead?

Something like Mechwarrior but the player can't actually mod their ship - the player just picks an available "mod" version of their ship from a "parts list" like weapon selection; restrict available variants in a similar way to missile ammo? If no variant is selected, revert to default statistics of the ship as per ships.tbl / tbm's. If a variant is selected, just direct the game to read the entire table chunk from, say, ship_variants.tbl? (No selective data replacement to limit complexity; just get the modder to supply complete table entries for all variants. Much more work & typo risk on the modder's end though.)

Say if GTVA's BG14, all the latest block mods. Or if small-scale hodgepodge group, maybe 1 dude has bUly.pof because refurbished Ulysses hull with no advanced tech, but his 2 buddies have Myrms of different generations with different flight characteristics/loadout but look identical (i.e. same POF).

I'm no adequate coder so I dunno the complexity, but off the top of my head, I know this would need custom UI and enough code changes to FSO and FRED that there's no point doing it unless any campaign of considerable reputation decides to use it en masse. And I don't know how this can be extended to unplayable ships e.g. capitals.

Way back when I was messing around in FRED there was this lingering idea in my head to portray the generational gaps between ships, block upgrades, merc/pirate/engineer/IT hacker mods etc - you could do this in a small scale with ships.tbl, but even with 'separate entry' or 'template entry' in ships.tbl it still added to the limit. Somehow I could never get over that "OMG A LIMIT" feeling nagging at me, dunno why.

I suppose in the longer run this could go further Tachyon-style with add-on slots for ships on top of that, but I'm just dreaming at this point.

after typing this whole block of text I stumble across a similar thread by AdmiralRalwood, whoops. Glanced through it VERY quickly, seems to cover weapons too and is more complex (awesome, I didn't think that far, 'circular variants' didn't cross my mind at all; the whole 'implementation-via-stats-appending' drawbacks did though). But I'll leave this here since I had the variants thought for a while too i.e. years.

Right now one item I can think of that could only be done via 'appending' route is missile lock, but then again lock is presently determined by weapon type and not by shipcomputer e.g. Ace Combat...

Code: [Select]
FRED loadout editor layout / campaign loadout layout? (Reckon would need SEXPs to manipulate this between missions too, e.g. add-ship-variant -> pull from playable variants only)

Ship: GTF Artemis
Variant count in inventory: (somehow pull the below list from ship-variants.tbl, match text, populate accordingly in FRED and populate loadout menu)
GTF Artemis D.H. "1"
GTF Hydra "1"

Ship: GTF Chaos
Variant count in inventory:
SOF Chaos "2"

Ship: GTF Thor
Variant count in inventory:
GTB Athena "1"
GTB Athena Mk2 "1"


Code: [Select]
;ship_variants.tbl

$Variant: GTD Carthage
$Variant of: GTD Orion
 +not_player_usable  ;do not appear in variant list for loadouts, but display in ship editor variant list
;(Ship stats go below as per the norm)

Code: [Select]
;Target box
SSJ bad guy
SJ Sathanas
Variant: SJ Amritaya


I have one more query about fighterbeams but I suppose I should just stop moping and load the game again to see what has changed...  :nervous:
Inferno plz
The Power of Nightmares
TheHound: "Nice idea, but I have a thing against announcing campaigns before having them already finished."
G5K: "The flipside of that is that if you don't announce your campaign, yet take too long to finish it, other people may independently come up with some of the same ideas."

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Two questions: missile lock and variants
The short question:
1) Is the missile multi-lock part of trunk now or is it still WOD-specific code?
Still WoD-specific for now, but if you want an up-to-date master-branch build that includes the multilock changes, it shouldn't be much effort to compile one.

2) Last I remember ship templates were broken because of how data was being copied around. (correct me if I'm wrong please!)
You aren't wrong; they used to be broken. However, they're not anymore! I spent a lot of effort getting them working again, after we moved to Git, and the fruits of that labour wound up in FSO 3.7.4.

However, templates are rather limited in and of themselves, which led me to make that thread you linked. I highly recommend you add your thoughts to that thread, actually (don't worry about how long it's been since it was posted in; it'll be a relevant post, and I'm far more likely to look at that thread when I finally get around to implementing variants than this one).

I'm no adequate coder so I dunno the complexity, but off the top of my head, I know this would need custom UI and enough code changes to FSO and FRED that there's no point doing it unless any campaign of considerable reputation decides to use it en masse. And I don't know how this can be extended to unplayable ships e.g. capitals.
Firstly, capital ships aren't unplayable; they're just not playable by default because tablers don't usually give them the "player_ship" flag. There are several good examples of missions entirely designed around player-flown capital ships (some using advanced scripting to give the player detailed control over the ship's turrets, and some not).

Secondly, I don't see any reason why the idea as you've described it would need a custom UI or code changes. It sounds like you could do it just by adding new entries to the ships.tbl (or more likely a -shp.tbm) that are slightly-modified versions of existing ships, and then just putting them in mission loadouts and letting the player select them as usual.
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: Two questions: missile lock and variants
Yeah, you're not the first person to think about having a variant system in FSO.

Back when templates didn't work, I made my own script-based solution (they're still on the scripting board's first page), but it has its limits and most people probably don't want to bother with scripts. An in-engine solution like Ralwood proposed would very likely work much better.

 

Offline asyikarea51

  • 210
  • -__-||
Re: Two questions: missile lock and variants
Yeah a non-coder (more like I degraded back to zero after never touching the not-really-useful school assignments in forever) like me would probably go uncomfortable with scripts. I reckon it might be the same for other lurker n00bs, if it isn't part of the core engine and/or easily located, it isn't likely to be used quickly and by many modders, at least that's what I think. FWIW I don't know how to use variables in FRED either (despite coming from FRED1)... but that's another conversation.

It's true that for a small-scale mod, just cramming new shipclass entries into ships.tbl and going from there would work, you guys are right - players would just have to be careful not to pick the wrong icon at pre-mission loadout, but I dunno, at the time my brain just went, "the UI/editor loadout menus would have to be edited is if someone decides to use the feature across the board". I guess something, whatever it is, is just triggering my nitpicky-ness there. :banghead:

I thought I was doing something wrong with my own data set when I still had that old mod, then I did the Artemis template guide and then I saw the really weird behaviour in both normal and debug builds back then. Last time I read it was slated to be abandoned - and just by looking I could see why, I didn't expect it to get fixed anyway. And since it added to the ship count limit = you might as well just do a conventional entry in ships.tbl. Totally didn't know someone actually done all-out fixed it! :nervous:

Somewhere in my head is visualising a really nice laid-up pre-mission loadout screen, ship select and wing command is the same, but next to the ship select, you have a variant select with counts like missile ammo. Then to simulate 'new build hulls' vs 'incremental upgrades', just permanently remove the older variants from loadout (or maybe a global flag to block use of null as default, then use a cut-down ships.tbl and expand the ship_variants.tbl). Then below the top-right would be Tachyon-style 'add-on mods' selection... though how to make such add-on ship mods actually do something in missions is another thing altogether :shaking: since things like the radar in FSO is unlimited range...

Surprised that multi-lock isn't part of the main branch, here's hoping it does sooner or later. But oh well, anybody can wish, making it is another! Anyway if this variant thought strikes me again I'll go post in the other thread. Might not be the first, but at least I finally got this lingering thought out of my system.
Inferno plz
The Power of Nightmares
TheHound: "Nice idea, but I have a thing against announcing campaigns before having them already finished."
G5K: "The flipside of that is that if you don't announce your campaign, yet take too long to finish it, other people may independently come up with some of the same ideas."

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
Re: Two questions: missile lock and variants
Speaking of multi-missile lock in this thread, is it possible to modify the weapons.tbl and code in some way to allow that?
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...

 

Offline DahBlount

  • Moderator
  • 29
  • Alpine ☆ Cancer Tribulation
    • Minecraft
    • Skype
    • Steam
Re: Two questions: missile lock and variants
It's already been done, see the WoD mod. The code is not currently merged into master because the main branch containing it has not been updated to most recent master afaik and WoD uses custom builds that feature multi-lock and some BMPMan changes which would never get merged into master.
<Axem> yet still more insightful than #hard-light

<Axem> jad2.23 will just be cat videos

<DahBlount> So
<DahBlount> JAD2.2 is like that
<Axem> maybe
<Axem> it can be whatever you like!
<DahBlount> A Chocolate Sundae?
<Axem> sure

My models: GTF Gilgamesh - GTD Nuadha [Redesigning] - Ningirama [WIP] - GTG Zephyrus

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Two questions: missile lock and variants
Due to some BMPMAN slot usage cleanup in master, WoD probably doesn't need that bumped BMPMAN limit anymore.  ~probably~
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
Re: Two questions: missile lock and variants
Is it possible to get the WoD team to port the multi-missile lock to master so that the mods running FSOpen (including Shattered Stars) benefit? Either way, we can include smoother, exponentially accelerating/decelerating features of missile locks.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...

 

Offline DahBlount

  • Moderator
  • 29
  • Alpine ☆ Cancer Tribulation
    • Minecraft
    • Skype
    • Steam
Re: Two questions: missile lock and variants
Not at the moment, no.
<Axem> yet still more insightful than #hard-light

<Axem> jad2.23 will just be cat videos

<DahBlount> So
<DahBlount> JAD2.2 is like that
<Axem> maybe
<Axem> it can be whatever you like!
<DahBlount> A Chocolate Sundae?
<Axem> sure

My models: GTF Gilgamesh - GTD Nuadha [Redesigning] - Ningirama [WIP] - GTG Zephyrus