Author Topic: seperated SBanks  (Read 6222 times)

0 Members and 1 Guest are viewing this topic.

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Quote
Originally posted by Bobboau
ok how are we going to handel the load out screen? this needs a totaly new system seing as weapons are given a flag as being used or not for the entire ship


I just took a look at the code, and I realized that this will turn into a huge amount of work if the code isn't written carefully.  Done correctly, however, only one or two functions will need changing.

Keep the existing table entries as they are.  Then add a new entry, like HotSnoj said, specifying the allowed weapons for each bank.  Don't modify the existing loadout code (it'll require massive code rewriting); instead, add a new subroutine to check for if a weapon is allowed on a bank.

So the new table entry will read as follows:
$Allowed PBanks:    ( "blah1" "blah2" "blah3" )
+Allowed PBank:  1  ( "blah1" )
+Allowed PBank:  2  ( "blah2" "blah3" )

To the ship_info structure, add
Code: [Select]
int restricted_loadout_flag[MAX_SHIP_WEAPONS]
int allowed_bank_restricted_weapons[MAX_SHIP_WEAPONS]
               [MAX_WEAPON_TYPES]


Inside the ship parser, set restricted_loadout_flag[bank] whenever a "+Allowed PBank: X" or "+Allowed SBank: X" line is encountered.

The loadout screen will only restrict the loadout on a bank if it sees that restricted_loadout is set for that bank.

This way, you can let the existing loadout code handle just about all of the work.  All that needs to be changed (aside from the parser and ship structure) is a little something added to the function drop_weapon_on_slot, saying that this weapon is not allowed if this is the wrong slot.
« Last Edit: December 13, 2002, 02:01:41 am by 561 »

 

Offline diamondgeezer

Now all we need is to be able to arm a fighter with as many different primaries as we can fit in the weapons table! Booyah!

Probable use for this project - make sure bombers use bombs only in what are blatantly the big bombs bays. The Boanerges, for example, can currently accomodate a single Helios in its small missile bay. This is a bit daft. OK, in this example it's a cosmetic thing more than anything else, but since I'm not the one doing the work... :cool:

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
well I've gotten the ship info stuff loading right, but the mission UI stuff is... complicated :eek2:
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

 
"Don't worry little folder. I'll keep the nasty SCP people from you"... :wink:

   I use almost every weapon made (released of curse) BUT if this system were to implement then I would have to re-edit all the ship tables to allow all weapons again... Is this correct..... FOR EVERY SHIP!... Bad enough I eventually will have to enable them as it is cause each set is programmed with certain weapons anyway..now they HAVE to be in certain places..... I think that primaries on the left and secondaries on the right are good enough.... But that is just my humble opinion...
Don't think of it as being outnumbered. Think of it as having a wide target selection !

ICQ#: 5256653
[email protected]

Projects: Gundam TC, Trek BTFF, REF, and Beyond Redemption
http://photo.starblvd.net/Star_Dragon

  

Offline HotSnoJ

  • Knossos Online!
  • 29
    • http://josherickson.org
Quote
Anyway I thought of a new-er system to support older tables (back compatability).

[ship with three SBanks]

$Allowed SBanks: ( "MX-50" "D-Missile" "Fury" "Interceptor" "Hornet")
+SBank0: ("Fury" "MX50") ;;if not set (written) then unwitten bank can hold weapons flaged in "$Allowed SBanks"
+SBank2: ("Bigbomb")
$Default SBanks: ( "MX-50" "Hornet" "Fury")
+Sbank1: ("Interceptor")
$SBank Capacity: ( 40 ) ( 35 )


So as you can see the second bank (SBank1, not written) can hold all of the weapons flaged in $Allowed SBanks:, and $Default SBanks: would act somewhat the same.


READ IT!
I have big plans, now if only I could see them through.

LiberCapacitas duo quiasemper
------------------------------
Nav buoy - They mark things

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Quote
Originally posted by Star Dragon
"Don't worry little folder. I'll keep the nasty SCP people from you"... :wink:

   I use almost every weapon made (released of curse) BUT if this system were to implement then I would have to re-edit all the ship tables to allow all weapons again... Is this correct..... FOR EVERY SHIP!... Bad enough I eventually will have to enable them as it is cause each set is programmed with certain weapons anyway..now they HAVE to be in certain places..... I think that primaries on the left and secondaries on the right are good enough.... But that is just my humble opinion...


no that is not corect, if the parser doesn't see that you have specificly given a bank custom compatability it will asign that bank the same compatability as the first bank,
meaning that if you don't want this just don't implement it and you won't see any diference,
if you do then there's a bug
you know reading the second half of your mesage, I am realy starting to wonder what you're talking about

I'm starting to get the hang of the weird way this bit of code works, if i get good enough, I'll be able to implement some of the cool things I've wanted to do, like selectable counter measures, and tactical systems (tag, targeting lasers, sessor enhancements, ect...)

on a related note I've nearly gotten it working, in addition to substitutable textures I'm just doing a bit of teasting...
you know why don't I let you test, you should note that the chances of major bugs is high seeing as I have three half done little tested features that are WIP includeing

crap... WV servers are down...
I'll tell you when I have it uploaded
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 diamondgeezer

Quote
Originally posted by Bobboau
... if i get good enough, I'll be able to implement some of the cool things I've wanted to do, like selectable counter measures, and tactical systems (tag, targeting lasers, sessor enhancements, ect...)


:eek2:

Dear God... my face just had the exact same expression as the eek2 smily for a good ten seconds...

 
You realize I was just joking...
I was just reminded of that Mccoy quote, "You know engineers, they just LOVE to change things."

    I fully respect/admire the efforts of the SCP individuals and look forward to us all benefitting from your, improvements.

    BTW side note... If I use the Aurora cannon, it AUTOMATICALLY summons the SSM's if I stay on target too long (Messy for fighters, but GREAT for larger ships!) a REAL 2 FOR 1 WEAPON!

  :nod:
Don't think of it as being outnumbered. Think of it as having a wide target selection !

ICQ#: 5256653
[email protected]

Projects: Gundam TC, Trek BTFF, REF, and Beyond Redemption
http://photo.starblvd.net/Star_Dragon

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
my old Aurora cannon, heh, I didn't know anyone ever looked at that old weapon pack :),
do you like the pirate beams ;7

ehh, it shouldn't be calling an SSM strike (in any recent FSO exe) unless the table has been changed, targeting beams now need to be tag 3 and be given a SSM index (yes I do like to change things, but this was for the better), tag 3 missles also now call forth an SSM strike
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 HotSnoJ

  • Knossos Online!
  • 29
    • http://josherickson.org
has anyone put this in the code? or must I revive it? :drevil:
I have big plans, now if only I could see them through.

LiberCapacitas duo quiasemper
------------------------------
Nav buoy - They mark things

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I had some problems and I sort of lost the code, I still have it but there are a lot of bugs (unreleted to this), I can copy my changes once I get some current bugs fixed
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 IceFire

  • GTVI Section 3
  • 212
    • http://www.3dap.com/hlp/hosted/ce
Quote
Originally posted by WMCoolmon

Does anyone read my posts, or was I just not clear on that? :confused:

Just ensuring that there was no confusion.  Not the other way around.  No worries.
- IceFire
BlackWater Ops, Cold Element
"Burn the land, boil the sea, you can't take the sky from me..."

 

Offline HotSnoJ

  • Knossos Online!
  • 29
    • http://josherickson.org
:bump: :D

Long time no checkup! How goes the coding or has it been dropped?

BTW could this be done for primarys too?
« Last Edit: April 25, 2003, 04:45:04 am by 516 »
I have big plans, now if only I could see them through.

LiberCapacitas duo quiasemper
------------------------------
Nav buoy - They mark things

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
It has been done, bugged, and bugfixed.  Haven't you kept track?

 

Offline redmenace

  • 211
hahaha the one thing we really need though right now is new interfaces to go with the new feature.
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
:wtf: What new interfaces?

 

Offline redmenace

  • 211
sorry thinking of bank specific load outs in the load out screen when you select your weapons the areas which you place them in are just silly. They look like they don't belong with the rest of the load out screen.
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline HotSnoJ

  • Knossos Online!
  • 29
    • http://josherickson.org
Quote
Originally posted by Goober5000
It has been done, bugged, and bugfixed.  Haven't you kept track?


Actully no. I just installed FS2 on my new computer (which doesn't have internet access) and so before I just wasn't all that interested in reading so much for something I couldn't use. But now I'm going to download it.
I have big plans, now if only I could see them through.

LiberCapacitas duo quiasemper
------------------------------
Nav buoy - They mark things