[MOD REQ] Infinite ammo on player-owned ships

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

[MOD REQ] Infinite ammo on player-owned ships

Post by swatti »

Imagine you have about a dozen different cap-ships, they all use some kind of ammo and so far the command to auto-rearm doesnt work...

So far ive been using save editors to add 99999 ammo to my ships but the editors are quite broken and tend to mess things up.

Sooooo, to help things out till they fix it, could someone please make a mini-mod to have infinite ammo or no ammo-consumption on capital-ships. Kinda like the "no jump fuel needed mod"
swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti »

Seriously, no-one? Anyone? Boobies...?
User avatar
Tamina
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 4631
Joined: Sun, 26. Jan 14, 09:56

Post by Tamina »

Since when are capitals using ammunition?
Sure ammunition for capitals is implemented, but I thought it never was actually used as my Capitals work fine without.
Are Boans using ammunition?

Code: Select all

Und wenn ein Forenbösewicht, was Ungezogenes spricht, dann hol' ich meinen Kaktus und der sticht sticht sticht.
  /l、 
゙(゚、 。 7 
 l、゙ ~ヽ   / 
 じしf_, )ノ 
swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti »

Missile TURRETS need ammo.

I take it you mean "balor" the frigate? Theres a debate if it uses ammo or not. It may have changed between patches too but at the moment i dont think it does. The missiles are its "main gun"
I'd be happy if someone confirms this. The balor is a bit shy about using its missiles.

EDIT: well, i can confirm, BALORS DO NOT NEED AMMO for novadrones. They are just a bit shy on using em...

EDIT2: Balors do seem to be happy to shoot the missiles at fighters... Morons.
Last edited by swatti on Sat, 8. Nov 14, 15:18, edited 1 time in total.
User avatar
Sandalpocalypse
Posts: 4447
Joined: Tue, 2. Dec 03, 22:28
x4

Post by Sandalpocalypse »

I can't find any way to stop missile turrets consuming ammo, or to make pretend missile turrets that shoot bullet-'missiles'. And I spent a long time trying.

The easiest way is probably a script that adds ammo to any ship that isn't full every five minutes or so.
Irrational factors are clearly at work.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

What missile turrets require ammo? I never noticed any of them using ammo.
swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti »

BlackRain wrote:What missile turrets require ammo? I never noticed any of them using ammo.
Arawn & Sucellus V-launchers and Arawn and Taranis Swarm-launchers.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

swatti wrote:
BlackRain wrote:What missile turrets require ammo? I never noticed any of them using ammo.
Arawn & Sucellus V-launchers and Arawn and Taranis Swarm-launchers.
What makes you think it requires ammo? I was just testing my new missile boat that fires only astrobee launchers, of which there are 6, and it never ran out despite a long battle. I am also looking at the ship in my save. There are no missiles in the cargo of the ship and for the turret it just says ammunition="1". Where does it show missiles?
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

Now I am looking in game. I just built and used a missile ship and I am looking at the details. I see nothin in there that mentions any missiles or ammunition.
User avatar
Sandalpocalypse
Posts: 4447
Joined: Tue, 2. Dec 03, 22:28
x4

Post by Sandalpocalypse »

Ammo doesnt appear in cargo or in any ingame visible attribute of a ship afaik, except in the SY dialogue.

When ships are created by Jobs they are assigned ammo.
Missile turrets have a Storage attribute that determines their ammo storage.
You can reammo ships at the shipyard.
There is a file in Aiscripts for teaching the AI about ammo.

When I was testing a ship it wouldn't fire its V launchers until i reammo'd it.

that's my data points

P.S.
The "Ammunition" attribute in Turrets appears unrelated to ammo consumption, and determines burst-fire behavior (like Xenon turrets and V-Launcher turrets)
Irrational factors are clearly at work.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

Sandalpocalypse wrote:Ammo doesnt appear in cargo or in any ingame visible attribute of a ship afaik, except in the SY dialogue.

When ships are created by Jobs they are assigned ammo.
Missile turrets have a Storage attribute that determines their ammo storage.
You can reammo ships at the shipyard.
There is a file in Aiscripts for teaching the AI about ammo.

When I was testing a ship it wouldn't fire its V launchers until i reammo'd it.

that's my data points

P.S.
The "Ammunition" attribute in Turrets appears unrelated to ammo consumption, and determines burst-fire behavior (like Xenon turrets and V-Launcher turrets)
I see, and what happens if you set the ammo storage to 99999999 or something in the turret macro?
User avatar
Sandalpocalypse
Posts: 4447
Joined: Tue, 2. Dec 03, 22:28
x4

Post by Sandalpocalypse »

didn't try that but the fill numbers used in the ships file are by %
Irrational factors are clearly at work.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

Sandalpocalypse wrote:didn't try that but the fill numbers used in the ships file are by %
Yeah but that just gives them a certain number of missiles when they spawn and it specifies it as a percent of max. Max storage of astrobees in the turret macro is 20 missiles. V launcher it is 200. Probably changing that number might do the trick
User avatar
Sandalpocalypse
Posts: 4447
Joined: Tue, 2. Dec 03, 22:28
x4

Post by Sandalpocalypse »

i did try zeroing it and commenting out the line and the only discernable effect was that i couldn't reammo at shipyards anymore.

i tried a lot of things! :(
Irrational factors are clearly at work.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

Sandalpocalypse wrote:i did try zeroing it and commenting out the line and the only discernable effect was that i couldn't reammo at shipyards anymore.

i tried a lot of things! :(
Heh but you didn't try what I mentioned above. Try editing the turret macro and changing the storage number to some ridiculous number but you would need to test with a new ship or even a new game.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

here some methods i imagine would remove the ammo requirement (i followed the whole chain from the turret macro to the wares.xml) - i think you just tried the first 2:

A) in the libraries/wares.xml:
<remove sel='//wares[@id="swarmmissile"]' />
-> not good because it removes a ware from the economy completely and therefore may have sideeffects

B) in the assets/fx/weaponfx/macros/missile_turret_swarm_macro.xml
<remove sel='//ammunition' />
-> may not work since default values could be assumed by the game if not defined

C) in the assets/props/WeaponSystems/macros/turret_missile_sm_macro.xml
<replace sel='//bullet/@class' >missile_turret_swarm_ammoless_macro</replace>
additionally copy the assets/fx/weaponfx/macros/missile_turret_swarm_macro.xml into the mod as missile_turret_swarm_ammoless_macro and apply the change from B there
-> most reliable method: introduces a new Bullet Type for the Turret for which no ammo is definied and which therefore doesnt need ammo
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
User avatar
Sandalpocalypse
Posts: 4447
Joined: Tue, 2. Dec 03, 22:28
x4

Post by Sandalpocalypse »

*strangely enough it doesnt seem to matter if the missile has a ware - i tried using newly defined missiles. nor can i get a newly defined missile to show up in the ammo list even if i give it a ware, HOWEVER this may be because the shipyard doesn't trade the missile.

*doesnt work, and that field doesnt have to do with ammo...

*i tried bullet-missiles, mostly they seemed to cause the turret ai to break. I tested a combination of approaches (turrets shooting missiles, turrets shooting bullets, missileturrets shooting bullets) here but only gave each one about 2 minutes of testing so *shrug*

Note if you try this: Changing the turret class will make the turret in a save file invalid, be careful.

*i tried new bullet types, if i understand your meaning correctly.

it's really stubborn! anything other than astrobees and v crushers doesn't seem to work.

the most aggravating thing is the apparent lack of difference between balor torpedoes and any other randomly defined missile shot from a turret. I think ammo must be something inherited from the missileturret class. Does anyone know where classes are defined? Heh.
Irrational factors are clearly at work.

Return to “X Rebirth - Scripts and Modding”