[SCRIPT] Weapons Changer v2.50 [Updated 15/07/07]

The place to discuss scripting and game modifications for X³: Reunion.

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

Teladidrone
Posts: 644
Joined: Tue, 24. Aug 04, 11:41
x3tc

Post by Teladidrone » Sun, 13. May 07, 22:36

No I did not try mode 11 because documentation says that is only for internal testing.
I was out of sector and reworked the weapon layouts for a Hyperion on the other side of the galaxies about... well... 20 times at least I guess because I was never satisfied.

And then suddenly the script stopped responding no matter what input I gave and it just added another "- weap D" to the ship name for every new command I tried.
I called the ship to me in sector, but that did not change anything at all it was stuck somehow.
Finally I gave up and reloaded a earlier save game, redid the weapon layouts again and this time everything worked as expected and I could not reproduce this error. :(

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny » Mon, 14. May 07, 10:42

The next upgrade to this script will remove the delay time for OOS. That should make it easier to find the remaining errors.

[EDIT] I tested the script last night which restarts with every mode change. Testing will probably be finished this weekend (20.5.07)

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Fri, 25. May 07, 22:16

Would you include a german TFile?
The file is here.

TBH, I could not resist messing with the english one, too. Added a leeeetle bit of colour so the command button and hotkeys are easier to spot.
I have a ton of Hotkeys installed in my game and it's not easy to see which belong together. A colour scheme makes it easy.

Matter of taste, I guess.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny » Sat, 26. May 07, 12:08

That was good timing, weapon changer work started again today :)

Cheers


Bunny

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Sat, 26. May 07, 13:17

Speaking of work...
the WC renaming ships can have odd results.

I like to rename my ships occasionally but this is not possible when WC is running.
On the Playership, WC will revert the name back to what it was before everytime you switch to another configuration.
Have not tested it on any NPC ships because it's probably the same system.

I think WC should not rename the ship when the name has been changed by something else in the meantime.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny » Sat, 26. May 07, 13:43

The name changing is the remaining problem :gruebel:

The other one is the script delay OOS but we have a solution to that one.

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Sat, 26. May 07, 14:19

Shouldn't be too much of a problem.
If the script records (into a local Var) what it changed the name to, it can tell if the name was changed by other means.
If so, the recorded "old name" needs to be updated instead of the ship being renamed.

It's not even a major script change because thats just one subroutine and you can replace all Set Name commands with the gosub.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Mon, 28. May 07, 11:31

I currently fly an LX and use both PBE and HEPT.

I found that I was switching weapons a lot and always in the same way. So I scripted it. =)

Download script v1.00

It only works for the playership and is intended for fighters.

There is no pretty button or anything.
hww.bunny.autoswitch needs to be run (R) from the scripteditor and will be started on the Playership.

If the player leaves the ship the script keeps running on this ship but goes into a power saving / sleep mode.
If you wish to use it in another ship, you need to start it manually for the other ship, too.

You can not stop the script but it will terminate itself if you stop the Weapon Changer script.

What it does:
Select weapon configs, using Weapon Changer, depending on the target.

The script will switch configs once if the state of the target changes. If you manually choose another config it will not override your orders until another scripted condition is met.

If any ship is targeted while you start the script, it will operate in "cap mode".
In this mode Config C is assumed empty.
It will not switch to Config B until the target's hull is below 81 %.
It will switch to Config C if the target's pilot bails.


(1 = Highest Priority, 4 = Lowest)

1. Config C if HullMax < 6600 (means M4 and smaller, Missiles...)
. . . Something fast like PAC or PBE to smack all the little pests.
2. Config B if Shields < 4000 and HullMax < 20000 (unshielded M3/M3+)
. . . HEPT or other hull killers.
3. Config B if Shields < 15000 (unshielded M6 or bigger)
. . . HEPT or other hull killers.
4. Config A (Ships with shields)
. . . PBE, IONS, whatever you prefer vs shields.

So I always have the right weapons loaded for Anti-Trash, Anti-Shields, and Anti-Hull. This is exactly the kind of thing I want my board computer to do.
Joyriding an M3 in a Xenon sector is far more relaxing that way. =)

For Config C you could also use less than a full load of (PBE, PAC, whatever) as well as none or smaller turret lasers to increase the chance of capping the little ships.
I use 8 BPBE for Config A and 4 BPBE for Config C. Roasting an M4 is still quick. =)
Config B is 8 AHEPT for me.


@ Bunny
If you wish to include this script with WC, feel free.
Adding a "mode" to start this script won't be a big deal.

It is completely self contained and restarts itself in Task ID 7028 on [PLAYERSHIP], regardless of how it is started.
Several minor issues (only checks the Player Tracking Aim for target and such) prevent it from being used by AI ships atm.

Adding a command button would have been silly because it's just a plugin for the WC. =)
Last edited by Gazz on Sat, 2. Jun 07, 05:44, edited 2 times in total.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Sat, 2. Jun 07, 13:44

Re: WC 2.01

The OOS switching does not seem to work.

Started WC with mode 7. (Just to be sure)
I load weapons, program Config D with mode 8.

Then I unload all weapons and have the ship jump OOS.

I would expect *some* weapons to be loaded now but it's not happening.
Manual switching between Config A/B/C works with direct hotkeys or switching.


BTW: The autoswitching script works very well.
Clearing a Xenon sector netted me 5 captured LX and 2 L.
All with an average hull of 70 %.

In a big furball I sometimes miss a ship turning blue and keep firing but the script turns off the main guns. =P
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

cloppy007
Posts: 95
Joined: Thu, 18. Jan 07, 23:20

Suggestion

Post by cloppy007 » Mon, 4. Jun 07, 22:29

Hi,

I use capital ships A LOT, and I have config B as antifighter loadout and config C as anti capital ship. The problem is, when I switch loadouts, I have to manually change turret configuration.

Can you save turret commands along the turrets weapons?

Thanks!

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Mon, 4. Jun 07, 23:09

No but there already is a script that does that.
Allows you to save several turret software configurations.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

cloppy007
Posts: 95
Joined: Thu, 18. Jan 07, 23:20

Post by cloppy007 » Wed, 6. Jun 07, 08:04

I think it would fit better for me that this script could do that, because using 2 commands for switching to antifighter mode is... a bit complex (I'm feeling lazy today).

ScorpiusX
Posts: 263
Joined: Wed, 16. Aug 06, 22:44
x4

Post by ScorpiusX » Sat, 9. Jun 07, 19:46

Nice work Bunny, I'm really liking this script.

Erm there is just one thing though. The pictures of the weapons (where you'd normally change weapons) aren't changing when I cycle through weapons, they're showing the last weapons installed when i set the script up, in this case PSGs. Is there anything you can do about this (or have I messed up somehow)? EDIT never mind the piccy changes if I swap turrets using that little arrow thingy instead of F1

Thx ScorpiusX

Ps Bunny thankyou also for the remove rocks script, thats made playing the game in areas like Ore Belt possible for me now :D
ScorpiusX Corp company motto:

"We don't want to rule the Galaxy"
"We just want to own it!"

cloppy007
Posts: 95
Joined: Thu, 18. Jan 07, 23:20

Post by cloppy007 » Sat, 9. Jun 07, 21:15

I think he's aware of that.

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny » Tue, 26. Jun 07, 00:16

Yeap, the weapon display update bug is something beyond script control.

Anyway - testing of the upgraded weapons changer is almost complete:

we have
- Improved hotkey programming of weapon configurations (less fiddly)

- Ship name weapon config label no longer gets added multiple times. It is also possible to rename the ship while the weapon changer is operating

- Two causes of script failing to respond identified and fixed (setting 11 was putting hotkey cycling to sleep and also a hotkey would not start the script it had already stopped)

- Automatic IS/OOS swapping would not work if OOS setting D was not programmed (now it is done by default - player has to modify as desired)

- "Clone settings to identical ships" function added and is now being tested. This means you can program the settings on one ship (say a nova) and then transfer this information to all other ships in the sector. This makes a fairly big difference if you have 50 ships to program by hand.

Should be out by this weekend


Cheers

Bunny

[EDIT] Clone feature now working

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny » Sun, 15. Jul 07, 10:42

Famous last words...

Version 2.50 is out

Cheers

Bunny

User avatar
BoomerM6
Posts: 134
Joined: Mon, 14. Aug 06, 21:41
x3tc

Post by BoomerM6 » Wed, 17. Oct 07, 23:23

Hello,

First thank you very much Bunny for that script, i love it!
It's a first need into a game like this.

I THINK I NEED SOME HELP about your cloning command feature becose it's not working for me.

Can you defin how it's work?
How do setup weapons changer on multiple ships?
If the ships are identical then the clone feature can be used. Program the weapons changer on one of the ships and then run input mode 12 to broadcast this information to all other identical ships in the sector.
I have 2 Sohnen (m7) with the same number of weapon in the same sector and when i tryed to go weapon changer/12 it does nothing.
The first time i lost my configuration for the first ship, the second time no but it does nothing.

Can you define how to use it clearly?
Thank you!

[CMA]Radon
Posts: 63
Joined: Wed, 15. Mar 06, 22:07
x3

Post by [CMA]Radon » Wed, 17. Oct 07, 23:37

I have been meaning to post this for a while, so I'll let you know my (similar) problem, too.

I have found that with v2.5, the script does not work with turrets. I think (can't quite remember now) I tried using it on an M3 rear turret also, but it did not work. It does work with M3 front turrets, no problem.

However, I got my Split Python finally, and filled it up with the weapons I want, and had the same response as BoomerM6.... nothing.

So in desperation (I really want those flak's working alongside my PPCs) I reverted to v2.01, and the turrets work fine.

Make what you will of this!!! :D

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny » Thu, 18. Oct 07, 01:05

Did you program it using hotkey or modes 4,5 & 6?

I'll look into it

BTW - check the log to see what messages it is sending.

[CMA]Radon
Posts: 63
Joined: Wed, 15. Mar 06, 22:07
x3

Post by [CMA]Radon » Fri, 19. Oct 07, 00:10

Bunny wrote:Did you program it using hotkey or modes 4,5 & 6?
I tried using both.
Bunny wrote:BTW - check the log to see what messages it is sending.
Gah! I forgot to tell you that. I start the script on the capital ship (m2) and up to about a minute later, the log tells me it has stopped. So I get a message saying it has started, and then that it has stopped.

Re. the turrets of m3's, I'll check whether or not that works and get back to you.

Post Reply

Return to “X³: Reunion - Scripts and Modding”