Author Topic: Guidence for weapon sys.  (Read 770 times)

Trickey

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Guidence for weapon sys.
« on: April 07, 2015, 12:15:47 PM »
So, I suppose I strike again - though this time in SR2.

  This time, I come to you to ask what I hope is a simple question. I have desires to add some variable in weapon designs (and possibly shields and armor - but that's for an entirely different time, so ignore those for now.) and have as such attempted to implement a handful of designs. Two worked (one more-so than the other), but the other two refuse to show up in-game. I have little clue as to how to make them work, and as such, I posted here.

Trickey

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Guidence for weapon sys.
« Reply #1 on: April 08, 2015, 11:15:21 PM »
So, I suppose I strike again - though this time in SR2.

  This time, I come to you to ask what I hope is a simple question. I have desires to add some variable in weapon designs (and possibly shields and armor - but that's for an entirely different time, so ignore those for now.) and have as such attempted to implement a handful of designs. Two worked (one more-so than the other), but the other two refuse to show up in-game. I have little clue as to how to make them work, and as such, I posted here.

Alright, so I got a little busy with work, so it too me a bit to remember that I had failed to put an example of my coding in to see if you might see an issue with it.

Code: [Select]
Subsystem: HellFireSupportPod
Name: Hellfire Support Pods.
Description: A disposable attachment pod of missiles that fire in rapid succession.
BaseColor: #5b3915
TypeColor: #682e01
Picture: SubsystemButtonArt::1
Elevation: 2

Tags: BaseCost
Tags: WeaponBase, MissileBase, Category:Weapons, Rotatable
Tags: ExteriorCore, Weapon, DefaultUnlock, HasInternals, MainDPS, Homing, IsExplosiveWeapon
Hull: Support

Size := HexSize * Hexes
Range := Size + 100
Damage := Size * 7.7
Reload := 6
Speed := max(65, Range / 10)
Tracking := 5.0
SupplyCost := Size * 4.0
out DPS := (Damage * 8) / (Reload * 2)
out SupplyDrain := SupplyCost / 1.5

Hex.HP := 12 * HexSize
Hex.Resistance := 0.2
Hex.Mass := HexSize

Requires:
Command = 0.5

Module: Default

Module: Core
Hex.HP := Hex.HP * 2
Hex.BuildCost := 5.0 * Hex.BuildCost
Hex.Mass := 5.0 * Hex.Mass

Sprite: RocketPod::0
DrawMode: 1

Hex.DamageResist := ShipSize / 64.0
Effect: DamageResist
Resist = Hex.DamageResist

Effector: Rockets
Range = Range
Damage = Damage
FireDelay = Reload / 8
PodSize = 14
Reload = Reload
Speed = Speed
Tracking = Tracking
SupplyCost = SupplyCost * (Reload / 8)

As you can see, this is a the rocket pod for the flagships that I've attempted to adapt and alter for use on support hulls. The end, 100% idea was to have a pod that would go offline after firing a mass salvo of about 10-12 rockets at once. Issue is that it doesn't even show up in-game, so I can't even see how its functioning. Any advice?

dalolorn

  • Sentient
  • **
  • Posts: 199
  • Karma: +7/-0
  • ABEM Developer
    • View Profile
Re: Guidence for weapon sys.
« Reply #2 on: April 09, 2015, 04:23:08 AM »
Heh, I meant to tell you about that, but I forgot... :-[

Anyway, back to the matter at hand:

I'm not sure what's causing the problem. I don't see how it would 'go offline after firing a mass salvo of about 10-12 rockets at once', mind you - but the only thing I'm immediately noticing is that you're calling the Rockets effector wrong. FireDelay should be Reload / PodSize (in this case, 14), and SupplyCost should be SupplyCost * (Reload / PodSize).

Could you run the game with the mod enabled and post the contents of C:\Users\YourUserName\My Documents\My Games\Star Ruler 2\log.txt (or its Linux equivalent, if appropriate) here?

Trickey

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Guidence for weapon sys.
« Reply #3 on: April 09, 2015, 03:08:24 PM »
Ah, it's alright -  we all make mistakes.

Well, ideally, it would damage the core subsystem a little with each shot fired, until - at the end of its payload - the core was inoperable. In addition, if I could disable any possible repair effects to that sole system, it would make the plan perfect IMO. Implementation, however, will be the ultimate judge.

I will quote-post the code onto this post when I get a moment away from everything going on around here. Pardon for the delay, and thank you.

dalolorn

  • Sentient
  • **
  • Posts: 199
  • Karma: +7/-0
  • ABEM Developer
    • View Profile
Re: Guidence for weapon sys.
« Reply #4 on: April 10, 2015, 03:31:34 AM »
Eh, that's not going to work. I have doubts about whether damaging the core hex like that is even possible, but disabling repairs would require some serious hotwiring in the Ship script.

Edit: However, there might be a way around. Pass a FireDelay of somewhere between 0.1 and 2 seconds and a Reload of 1200 or more seconds. This'll make the pod discharge all its missiles in a single salvo, then wait 20 or more minutes before firing another series of missiles. No clue what to feed into SupplyCost, though.
« Last Edit: April 10, 2015, 03:39:33 AM by dalolorn »