[SCRIPT]-(31-08-09)-Weapon Select Extension v2.00

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

User avatar
Jaga_Telesin
Posts: 435
Joined: Sat, 16. Sep 06, 22:48
x4

Post by Jaga_Telesin »

As for my install, I am running 1.4 with a smattering of mods, none of which affect turrets. I believe 1.4 has a version of MARS built into it, since I've seen turrets re-allocate themselves manually before.

It isn't MARS doing it in this case however - I can check the weapon selection instantly after using the hotkey(s) (less than 1/4 of a second later), and my ship (Panther) *always* has only four weapons in the front turrets.

Quite positive the # of weapons on the ship exceeds the # of turrets, and since it is allocating them correctly in other turrets (that have 4 or less), the front appears to be the problem.

Doesn't matter what Profile I use either - I've tried stuff like repair lasers (8 of them) in the front and nothing in other turrets. It only assigns four in the front, the other four stay in freight.
kelmen
Posts: 308
Joined: Tue, 9. Dec 08, 15:11

Post by kelmen »

another finding, this is on front main gun set.

weapon loadout doesn't work on Vidar (Terran, M6, quest reward from Terran plots) its front main guns, with 10 slots.

I used the menu to activate the profile I just set (10 EMPG), doesn't work.
WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas »

I'll look into it, but the plugin is going to have drastically changed code-wise. It'll look and work the same, but its workings have changed completely.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov
WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas »

Update to Version 2.00
  • Version 2.00
  • Complete Re-Write
  • Available for Localization
_________________

The plugin will give you the ability to create four types of weapons profiles: global, personal ship, ship class, and ship type. Global profiles can be used by any ship - playership through the command or the menu and every other ship through the command. Personal profiles are set for a playership and only work with that ship - also only accessible through the menu. Ship Class and Ship Type profiles work on their respective namesakes allowing you the ability to change the weapon loadout of all ships of the class/type within one sector or the entire galaxy.

You also get four quick-fire missile slots which allow you to press one of the hotkeys and immediately launch a missile as you so desire. All of the slots take into account missile delay times and will not fire while waiting in the cooldown period.

The thing I'm most joyous of is the multi-press functions. Before, I only allowed one key for the multi-press and you could only have up to twenty-five multi-presses. Of course, this was on one key - impossible to keep up with twenty-five presses. So I changed this. Now, you can have up to one hundred multi-presses spanned across ten multi-press stacks - each stack has ten presses. By using a multi-press on the main menu hotkey, you can switch which stack you are using (or by going through the main menu). Then you use the quick-profile hotkey to select the profiles in that stack. In the first version, the only profiles you can set to this hotkey will be global profiles - acting only on the current playership. In the next version, any profile can be set.

I have also added the ability to disable some features. For ease of use and less clutter, you can opt to use Weapon Select Extension Lite which will only allow global and personal ship profiles. You can also configure it so that if the ship does not have enough of the profile's weapons in the hold, the guns will be emptied. As well, you can set it so that if you do not set a weapon in the profile at all, it will empty the gun.

As I said, save for those four errors, the plugin works beautifully.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov
WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas »

To the eight people who have tried it so far, how is it working for you? Any problems?
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov
sstbrg
Posts: 69
Joined: Mon, 11. May 09, 06:37

Post by sstbrg »

Working fine except one thing which I find annoying: after updating a global profile (replacing some weapons) and confirming, I need to go to the Multi-Press Menu and re-assign the profile. Otherwise if I try to switch it will tell me it switched to "null" instead of "<profile name>".

Also, some ships have just turrets and don't have any player controlled guns, so for those ships I need to start assigning guns from turret 1 and upwards. Turret 0, I guess, is for player controlled guns - so it's useless in case I use a ship like the Panther which has just turrets.

Hope that made sense :P
WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas »

Okay. So after you edit a profile, the profile no longer works correctly for the multi-press function. Got that, I'll fix it soon.

Turret 0 is "Turret Main" the player turret. So you're right, any ship without main guns cannot assign anything to this turret. If you're doing a ship type profile, it'll show just like a global profile and make you skip turret 0. What I can do to remedy this is spawn a ship of the selected type in sector null and return its turrets. To help in this endeavor, I can also make the weapons list only weapons compatible with that turret..

I'll start work on these things in a couple of hours when I can. Hope you can hold on till then.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov
kelmen
Posts: 308
Joined: Tue, 9. Dec 08, 15:11

Post by kelmen »

I created 2 profiles for my springblossom, and both i only interested in setting up the main guns
as turrets i will let MARS manage them

however, i can activate the quick-switch profile

in the multi-press menu, i cannot select any profile for the slot 01. and i still dont understand what's this slot are about

i expect that with the 2 profiles i created, I can switch between them depending on how many click of the quick-profile-key that i pressed, isnt it suppose to be work like this?
WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas »

If you don't wish to have the turrets ever change to anything, simply never set those up. As long as you said "No" to the second question that was asked during set-up, empty values won't switch your turrets.

If you're talking about the Combat Command, this will only allow you to use Global Profiles - profiles that only affect one ship.

If you're talking about the hotkey Quick-Profile, then this also only allows Global Profiles for now. I wanted to get a real version out before I started upgrading certain parts of it. This means that Ship Class and Ship Type profiles are not allowable profiles for the Multi-Press Menu.

You're right. Depending on how many times you've pressed the Quick-Profile hotkey, WSE will switch to a profile assigned to that slot if available for your current ship. Which slot it chooses, however, is also relative to which Quick-Profile Stack is active - which you can see and change at the top of the Multi-Press Menu.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov
kelmen
Posts: 308
Joined: Tue, 9. Dec 08, 15:11

Post by kelmen »

WindsOfBoreas wrote:If you don't wish to have the turrets ever change to anything, simply never set those up. As long as you said "No" to the second question that was asked during set-up, empty values won't switch your turrets.

If you're talking about the Combat Command, this will only allow you to use Global Profiles - profiles that only affect one ship.

If you're talking about the hotkey Quick-Profile, then this also only allows Global Profiles for now. I wanted to get a real version out before I started upgrading certain parts of it. This means that Ship Class and Ship Type profiles are not allowable profiles for the Multi-Press Menu.

You're right. Depending on how many times you've pressed the Quick-Profile hotkey, WSE will switch to a profile assigned to that slot if available for your current ship. Which slot it chooses, however, is also relative to which Quick-Profile Stack is active - which you can see and change at the top of the Multi-Press Menu.
is there's a way to change this 1st time start-up settings?
just my opinion: maybe this not necessary. unless the player specific to empty a weapon slot as "Emptied Gun", else the script can just skip that particular weapon slot.

I did tried created a global profile, somehow its not shown in the list, nor its available when i attempt to select in the multi-press slot settings.

maybe i got confuse with this global and non global things, honestly i dont really know what these are for.

I can understand profiling the setup by ship class/type, but really no idea what's this "global" suppose to mean.
WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas »

Yes, after you've set-up the first time, you can go into Cyrow's Community Plugin Configuration menu and select "Weapon Select Extension" under the heading "WindsOfBoreas". In here, you can change all three of the settings asked in the initialization.

Well, Global Profiles and Ship-Specific Profiles (i.e. "Your Buster Profiles") are similar in that they can affect only the playership. Ship-Specific Profiles are mainly to keep you more organized.

In future version, I'm going to change the way the command works so that when you select a Ship Type profile, it will change only that one ship instead of having to set-up a global profile and cluttering that section up.

Global just means that any ship can access that profile through the Combat Command. I'll change it as mentioned above in the next version.

_____

I am working on the next version, but please be patient. Between work and school (Russian, Lit, and two programming courses), I don't have much time, but I am devoting what time I do get to actually working on my stuff.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov
WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas »

How is this working out for people? Is it working well with 2.5?
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov
Mailo
Posts: 1941
Joined: Wed, 5. May 04, 01:10
x3

Post by Mailo »

I haven't noticed any weird stuff, but to tell the truth, I haven't used it much in 2.5.
Although ... when I switched ships from a Hyperion to a Naginata and back, my ship-specific weapon settings for the Hyperion were gone, I had to redefine them. Is this intended behavior? I guessed yes and that I should have used global settings? Especially as then I probably could use the hotkey to switch settings, instead of going through menus in battle.

The only problem with this is that the Hyperion has 8 front guns, the Naginata only 4 ... how do I keep those separated?

And since I haven't said it yet ... great script, thanks :D

Edit: Just restarted my game, and as the first time 'round under 2.1, I cannot find the hotkey "next target" in the options menu. I only see next/previous category, previous target, 2 save hotkeys and a menu one. When it happened in my last game, the missing key suddenly appeared after a while. Not this time, but maybe I just didn't wait long enough. Still a weird behavior.
As a personal service to all who try to keep up with my professional work:
[ external image ]

My script: Shiploot v1.04 ... loot shipwrecks, collect different loot parts and upgrade your ships!
Mein Skript: Schiffswracks looten v1.04 ... Durchsuche Schiffswracks, sammle Lootteile und verbessere Deine Schiffe!
WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas »

On the ship-specific profiles going away, it should not be doing that. I'll look into it.

Thank you. The menu system has allowed us to expand what we can do so much.

On ITS, try running the uninstall script then the setup script. You'll lose your settings, but the keys should come back.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov
Mailo
Posts: 1941
Joined: Wed, 5. May 04, 01:10
x3

Post by Mailo »

I'm sorry, my edit was into the wrong thread, it was hotkeys for the targetting system that were the problem :oops:
As a personal service to all who try to keep up with my professional work:
[ external image ]

My script: Shiploot v1.04 ... loot shipwrecks, collect different loot parts and upgrade your ships!
Mein Skript: Schiffswracks looten v1.04 ... Durchsuche Schiffswracks, sammle Lootteile und verbessere Deine Schiffe!
cheetah222222
Posts: 18
Joined: Sun, 31. Aug 08, 20:07
x3tc

Post by cheetah222222 »

Hi

Great script and incredibly useful.

I have a quick question - I was wondering what I need to change in the script to allow for some ships I imported from X3 XTM into TC which have more than 8 guns in a turret. I had a look at the main script (I am not a scripter) and could,t figure it out.

Best wishes
cheetah222222
Posts: 18
Joined: Sun, 31. Aug 08, 20:07
x3tc

Post by cheetah222222 »

Hi Boreas

Not sure if you got my email reply to your message.

I was wondering if you had any luck looking at which lines I would need to change in the script to expand the script for a 10-weapon front guns mount.

Best wishes
Coruskane
Posts: 851
Joined: Fri, 13. Jun 08, 13:14
x4

Post by Coruskane »

WindsOfBoreas wrote:To the eight people who have tried it so far, how is it working for you? Any problems?
Just to say..another one here.

Great script, does what it says with no muss nor fuss, and works smoothly.

(only issue I have is with 3 ships: venti, thresher and Vidar as they have 10 main guns but otherwise...)


Cheers,
Ash Axiom
Posts: 62
Joined: Tue, 26. Jan 10, 23:48

Post by Ash Axiom »

Great script, thanks for sharing it. I have one strange issue, but it's not major.

When I switch loadouts on my Panther, it sometimes doesn't switch completely. For example, I have one loadout called "Anti Cap" with 6 IBLs in the front mount and another called "Anti Fighter" with 6 CIGs in the front mount. Occasionally when switching from Anti Cap to Anti Fighter, only 4 of the CIGs load up properly. The other two slots remain IBLs. If I hit the command to switch again, it switches the last two. Strange, no?
SpongeBobSpacepants
Posts: 110
Joined: Sun, 19. Oct 08, 12:02
x3tc

Post by SpongeBobSpacepants »

erm bit new with scripts, how do you get to the MENU Hotkey plz ??

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”