[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

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

Post by Bunny » Thu, 1. Feb 07, 20:52

Thanks for the suggestions, I'll look into it :thumb_up: .

Snus
Posts: 209
Joined: Wed, 27. Sep 06, 22:52
x3tc

Post by Snus » Wed, 14. Feb 07, 20:59

Thank you Bunny for a very smart script :)

It should be in the script library, as its very useful and v. 2.002 compatible (atleast it works fine for me)

Keep up the good work :wink:

russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo » Thu, 15. Feb 07, 09:08

Yes, it is a superb script. Shame it can't be more "user friendly", but that's probably my own problem. Just can't seem to remember the different numbers and what they do, LOL. I use it all the time, and find it indispensable.

Snus
Posts: 209
Joined: Wed, 27. Sep 06, 22:52
x3tc

Post by Snus » Thu, 15. Feb 07, 11:16

russbo wrote:Yes, it is a superb script. Shame it can't be more "user friendly", but that's probably my own problem. Just can't seem to remember the different numbers and what they do, LOL. I use it all the time, and find it indispensable.
Hehe yea that can be a problem :lol:

I placed the heaviest weaponry on "1" and the lesser on "2"
That way i use to remember which is which :roll:

On my python 1 is for capital ships and 2 for fighters :)
Havent used the third loadout option yet...

8)

Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13093
Joined: Sat, 9. Nov 02, 11:45
x4

Re: [SCRIPT] Weapons Changer v1.45

Post by Xenon_Slayer » Thu, 15. Feb 07, 11:47

Bunny wrote:Technical Note:
There appears to be a slight bug with script editor command <RefObj>switch laser in turret <Var/Number> gun <Var/Number> to <Var/Ware>. A null ware does not clear the weapons slot (that was fun to work around :P)
I hope this helps you and other people. If you set the ware as string variable it should clear the turret. e.g

Code: Select all

$TestVar = 'Test'
<[PLAYERSHIP]>switch laser in turret <1> gun <1> to <$TestVar>. 
I tried loads of things. Setting variables as constants, numbers, scripts, ship classes e.t.c. This was the last thing possible and thank god it worked. Very odd bug that one.
Come watch me on Twitch where I occasionally play several of the X games

japesk
Posts: 58
Joined: Wed, 16. Feb 05, 03:08
x3tc

Post by japesk » Thu, 15. Feb 07, 20:45

Thank You Bunny!!!

This script has GREATLY helped with my Assassin (Cycrow's) missions. I like to use 8 APBEs when dealing with wingman, since the capure rate seems higher, then switch to the AHEPTS for the big guys. I was getting tired of having to exit the fight in order to install the HEPTS, then reentering. Now, I just lay on the PBEs until the shields are dropped, and hotkey to the full set of HEPTS to wipe the space lanes of the filth that is my primary target..

This is definately somthing that should have been originally put into the vanilla game.

Keep up the good work. I have been telling all my friends to get this mod--and, hopefully they will. This single mod has absolutely changed the way i loadout all of my ships....Thanks again

Squelch
Posts: 252
Joined: Sat, 15. May 04, 11:03
x2

Post by Squelch » Sat, 24. Mar 07, 10:12

Cool!

I'll give this one a try.

It strikes me, that the way the the weapons confiiguration stands in vanila game is incomplete. Having 8 primary slots that empty the energy reserves in quick order, instead of 2 primary slots, switchable between different weapons sets seems odd. Also the fact that the AI always uses the last configuration regardless, has led to the demise of some of my prize ships, simply because I was using them in capture mode and had left them without teeth.

Your readme looks like the script will redress some of this. I look forward to testiing it.

One thing I see that would possibly be useful. A ceasefire hotkey. I guess it would be possible to set one of your modes to empty to achieve this, but a dedicated ceasefire mode would be a godsend.

Here is an example.

I'm in sector, in a small ship, and and have a large ship with a PPC loadout present. A pirate harrier raider decides to have a pop at the cap ship, so it responds by spraying PPC all over the place. By the time I've accessed the ships menu to unload the cannons, it's too late, and destroyed half the stations. An over exaggeration I know, but the point stands. A simple ceasefire command would really help here.

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

Post by Gazz » Sat, 24. Mar 07, 10:37

There is a script to toggle ALL turret commands on/off and there is the AEGIS light script, allowing preselected turret commands much like Bunny's weapon changer.
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.

Squelch
Posts: 252
Joined: Sat, 15. May 04, 11:03
x2

Post by Squelch » Sat, 24. Mar 07, 10:55

Gazz wrote:There is a script to toggle ALL turret commands on/off and there is the AEGIS light script, allowing preselected turret commands much like Bunny's weapon changer.
I just found the toggle all turrets script. Thanks.

I take it, there aren't any conflicts with this one then?

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

Post by Bunny » Sat, 24. Mar 07, 15:28

Turrets on off should not conflict.

AEGIS light - not sure, I think this is just on the German Forum. Anyone have a link for it?.

Squelch
Posts: 252
Joined: Sat, 15. May 04, 11:03
x2

Post by Squelch » Sat, 24. Mar 07, 16:36

Thanks Bunny I have just been testing it.

It works great by the way. Other than the previous comments made here, it's worth pointing out that the ego weapon config selections ie What slots are firing, take precedance. So, if you leave a ship firing only one slot, that's how it stays. I'm not sure if this is controlable from a script.

Aegis Lite can be found here.

http://forum.egosoft.com/viewtopic.php?t=143932

It's German only as far as I see und mien Deutsch ist nicht shon gut.
Last edited by Squelch on Sat, 24. Mar 07, 19:25, edited 1 time in total.

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

Post by Bunny » Sat, 24. Mar 07, 18:21

Cheers.

This Lucike dude gets everywhere :P .

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

Post by Gazz » Sun, 25. Mar 07, 16:47

It occurred to me that since the mainscript on task whatever is running permanently and therefore there is a delay when giving orders to other ships, mostly when saving their base config.

If your setstate script would not just check IF the mainscript runs but also kick it out and restart a new mainscript... there would be no delay if the player personally gives an order.
I assume the configs are saved in local variables anyway so this would not matter. =)
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 » Sun, 25. Mar 07, 18:27

Nope the configs are not in locals that's why this script must be manually restarted.

With 3 configuration on a titan that would be 120 variables it seemed a bit excessive to try and store the arrays as locals.

The script was originally written and tested in 2 days flat and the idea was it would be the finished version that would not need expanding.

However, we now have the upgrade ideas for this.

Time for the flames.

Squelch
Posts: 252
Joined: Sat, 15. May 04, 11:03
x2

Post by Squelch » Sat, 31. Mar 07, 03:27

Hi Bunny,

I have run into a problem/bug.

I mainly use it on my M7. It works as expected while I'm piloting it, or if I undock my LX, IS/OOS modes etc appear to work too. Until I dock again. Then it will ignore all input. Either hotkey or via menu.

I've run debug on it and cannot see anything different while it's zombie state from normal operation. All variables are the same and the configs are still there. A debug log shows it cycling in While $State loop with a value of 7, but doesn't appear to register new input at all.

I haven't the foggiest why this is happening, and the only way get it running again is to:

run your hotkey removal
save
remove scripts
reload
save
reinstall scripts
reload
reassign hotkey and start mode 7

Incidentley I don't see a way to shut the script down. It's still running after the first reload, and the variables are still intact. I even tried to manualy run the main script with a value of 0 without result. Only after the second reload and hotkey reassignment does it behave again.

The only other scripts running on the ship are missile defense, and I have Hot turret switch installed. Both still function.

I hope this report helps, and you can recreate it. It's late now and my eyes are sore trying to work this one out.

It's a learning thing

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

Post by Bunny » Mon, 2. Apr 07, 17:34

:? Strange - upgrade should be out when I get back.


(wrong side of the planet ATM :S )

Squelch
Posts: 252
Joined: Sat, 15. May 04, 11:03
x2

Post by Squelch » Mon, 2. Apr 07, 18:32

Ok thanks Bunny,

I have tracked it down to a playership detection failiure, but still can't work out why. I'm going to test some different scenarios on other ship combinations later.

Safe travels :)

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

Post by cloppy007 » Mon, 2. Apr 07, 23:55

Hi,

I can't change the weapons loadout of my Xenon K, doesn't matter of I control it or if it is docked. When I load a weapons (manually, one by one), the configuration is reseted, there is a weapon in every 8th bank of the craft. I've tried to cleared the weapons configuration (mode 0), but I have yet to specify a weapons config A,B or C!!

Any clue of what's going on?

THanks!

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

Post by Bunny » Tue, 3. Apr 07, 00:50

Try clearing the turret commands and restarting them. Captured ships will still be running the NPC version of this software that swaps weapons. This has been know to cause problems.

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

Post by cloppy007 » Tue, 3. Apr 07, 02:21

It works :D

By the way the K is awesome, dogs gPPC fire even better than my Python (only tried against a pair of xenon capital ships, but anyways...). It's a shame it only has 6 shield bays.

Thanks!

Post Reply

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