[SCRIPT] Ship Claim System MK1 - v1.02 2007-02-21

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

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

User avatar
defiant1
Posts: 1141
Joined: Sun, 7. May 06, 03:53
x4

Post by defiant1 » Sat, 17. Feb 07, 06:16

ok i thought so...hehe...now to go pwn...errr...own some new ships...
Teladi Next Minute Shipping®

reinhart_menken
Posts: 229
Joined: Sat, 27. Jan 07, 05:23

Post by reinhart_menken » Sat, 17. Feb 07, 08:24

Okay, really weird, don't know what happened here. Like I said, at first it worked okay. Just now I had 5 ships that I needed to claim, so I got my carrier into the sector and was ready to give the command, but it was gone. It's just not there; my carrier doesn't even have the piracy menu. Then, when I moved the Ship Claim System to another ship, the Cargo Cloaking Device MK1 option shows up instead. I moved the system to another ship, the Cloaking Device command disappears =/

All I did was add a couple scripts, namely Hotkey Radiation Blast, Homebase removal, and NOS. No conflict even showed up in the Script Manager =/

Greg_G
Posts: 110
Joined: Tue, 26. Apr 05, 19:15
xr

Post by Greg_G » Sat, 17. Feb 07, 08:38

Hmmm... perhaps something is going screwy with the Custom Wares as the CCD uses them as well. There's a lot of Cycrow's magic in the Custom Wares so I just trust it to work and never looked into the code. It's possible I've misused it somehow, but I followed his custom wares documentation to the letter.

I'm too tired right now to ask you any intelligent questions to diagnose this, so I'll do so tomorrow. You could try using the script manager to uninstall, and then reinstall before you load your game (else you'll lose your SCS MK1 ware) and see if that helps. Do you have the CCD installed in X3, btw?

Off the top of my head I haven't the faintest idea how that could even happen.

reinhart_menken
Posts: 229
Joined: Sat, 27. Jan 07, 05:23

Post by reinhart_menken » Sat, 17. Feb 07, 23:52

It was late when I posted the question too. That was the last thing I did before I turn in. Anyways, I do have CCD installed in my game, but I haven't gotten one yet =/

I seem to remember having the option to cloak cargos as well (in the commands), when I first installed that script, but did not have the ware. I let it go without much further thought because I thought maybe it's meant to be in the commands menu at all times :shrug:

Just tried something right now. With the ship claiming software my fighter ships will have the cargo cloaking device command, but of course the command won't work. When I have only the actual cargo cloaking device, there isn't even the command to cloak cargos :shrug:

Oh btw, I don't think constant re-init-ing script would have any effect would it?

Greg_G
Posts: 110
Joined: Tue, 26. Apr 05, 19:15
xr

Post by Greg_G » Sun, 18. Feb 07, 00:12

Wow, I'm really stymied on this one. Assuming there's no conflict with another script you are using in either t file number, page ID number or command slot, my best guess is something is going wrong with either the custom wares system or my use of it.

I'll send Cycrow a PM later to see if I'm doing something wrong in my use of custom wares. So far my installation isn't exhibiting your problem, so I'm still not entirely sure that it's not a conflict on your setup, somehow.

In my experience, reiniting can cause some weird things to happen with commands. Some commands tend to disappear when you use reinit script cache until you load a save game. Have you been doing that a lot?

reinhart_menken
Posts: 229
Joined: Sat, 27. Jan 07, 05:23

Post by reinhart_menken » Sun, 18. Feb 07, 00:22

I've been doing that a couple times, since I am using the Remove PSG script, which the author stated that the script works on load or reinit, and I am taking Mercenary skirmish missions which spawns enemies with PSG. That script seemed to work (remove existing PSG's) when I reinit it, so I just did it whenever I see a PSG go off :P I just thought since he said it works when reinit then it's prolly save to reinit. I had been rather unwilling to use that function before that. :shrug:

It does seem though that right now "my game" thinks that the SCS is CCD and CCD is SCS, because I just tried removing CCD to see what happens, and then SCS "turned into" CCD. The reason I knew it "turned" because SCS then took 10 cargo space and the price went up to millions, which was what CCD used to be before I removed it. If it is problem with reinit then it seems that there is another weird behavior this feature could cause. Now if only someone knows how to fix problem brought on by reinit :P

Edit: well, just going to uninstall both of them, load the game, save it, and then reinstall it again. I don't really care about losing the SCS, because I can just buy another one easily :P Or "cheat" one back in since I deserve one :P Will let you know how it goes.

Greg_G
Posts: 110
Joined: Tue, 26. Apr 05, 19:15
xr

Post by Greg_G » Sun, 18. Feb 07, 01:08

Reinhart, thanks so much for all the great testing. I'm looking forward to your report. I really want to get this resolved properly.

reinhart_menken
Posts: 229
Joined: Sat, 27. Jan 07, 05:23

Post by reinhart_menken » Sun, 18. Feb 07, 02:00

Step 1
Okay...erm...even weirder, but it's "half" solved. I first uninstalled both CCD and SCS with Script Installer, loaded the game, checked the pirate base (result below), and then saved it. However, the wares weren't removed from all the ships and stations and instead appeared as ReadText; I was under the impression that they would be removed? I tried manually activating the uninstall scripts by going into SE, select the setup.plugin.xxx.uninstall, r, Enter, Enter; still there. There were two instances of ReadText, each for CCD and SCS, with corresponding cargo space.

Step 2
Next, I reinstalled first only the SCS. I checked the nearest pirate base, the ReadText that was for CCD (cargo space 10) was now named Ship Claiming Software, the ReadText for the old SCS was below it (2 cargo space), and then a new and "real" SCS was on the bottom (same 2 cargo space). I cheated my carrier the real SCS and indeed there was the command for the SCS. Note that CCD was not installed, but somehow the ReadText for CCD was changed to the name of SCS anyways.

Next I installed the CCD and things got worse. Let's see, the fake SCS with 10 cargo space that should be CCD is still named SCS. The ReadText for the old SCS disappeared, but the "real" SCS that was there in Step 2 became a fake Majaglit*, note the star sign (or whatever it is). It seems that the SCS was turned into one of those cloaked illegal goods =/ So I cheated myself (my ship is a fighter) both "goods", and I still got the CCD command in my command slot, but no SCS command. I moved the two goods to my carrier, and it didn't even have any command (since being a carrier, a CCD wouldn't work either).

So...that's basically the result. I'm still wondering whether or not the uninstall scripts should have removed the wares.

For now, being - not - a smuggler, I can live with uninstalling CCD, just install SCS, a ReadText and a fake SCS. Btw I thought that SCS turned into Majaglit was rather funny :P It seems that the custom wares were screwed up though?

And no problem for the testing, after all it's for my own benefit as well (to use this great script) :)

Edit: Lastly, I don't know if I should delete the shared files though. Last time I uninstalled a script and allowed the script manager to delete the shared files every goods and wares sold in the stations in the game became blank and I had to reinstall the game, so I said screw that, shared files stay.

Greg_G
Posts: 110
Joined: Tue, 26. Apr 05, 19:15
xr

Post by Greg_G » Sun, 18. Feb 07, 02:48

Yeah it's definately looking like it's custom wares related. And I've checked and can't find anything wrong with my tiny snippets of code related to custom wares, although if that snippet were wrong it could account for the items not being uninstalled. It obtains the ware object from one of Cycrow's scripts and then uses that ware object for all operations, including removing from stations and ships.

I've tried all these things myself without problems, of course, else I'd have this solved by now I can't work on it this evening, but I'll think on it and see if I can come up with a reason for this. If not, I'll contact Cycrow.

My biggest concern is the ware not removing from the bases issue, as that's just ugly. If it weren't for that, I'd suggest uninstalling and disabling custom wares entirely, exiting the script installer, loading a game, save it, reinstall just the SCS and reenable custom wares, and load that save.

On the good side, I'm fairly sure this has nothing to do with the main script functionality, but either my setup script or Cycrow's custom wares. I'd lean towards the former since I'm far less experienced than Cycrow when it comes to X scripting, but there's so little to go wrong in the setup script!

reinhart_menken
Posts: 229
Joined: Sat, 27. Jan 07, 05:23

Post by reinhart_menken » Sun, 18. Feb 07, 03:21

Oh well =/ It's alright, do what you have to do ;) I have no doubt that there's nothing wrong with your main function script, and I am using it right now :) I had the same though as you; I have only the SCS installed and not the CCD. I used to always jump out of the sector when I was detected anyways :lol:

Police go, "Please cooperate and drop your cargo!"
"Buh-eye"

neumanf15
Posts: 259
Joined: Mon, 26. Dec 05, 19:55
x3

Post by neumanf15 » Sun, 18. Feb 07, 04:38

Absolutely refuses to work right for me. Every time I install it, This is what I get added to my pirate base:
[ external image ]

That corresponds to SS_WARE_SW_CUSTOM1_2 in TWareT.

Script installer works well for everything else and I have custom wares setup right for my mod (DDRS).

I think the custom wares thing is borked. This is the first script I've seen use it. Any thought to using one of the numerous EMP wares instead?

Greg_G
Posts: 110
Joined: Tue, 26. Apr 05, 19:15
xr

Post by Greg_G » Sun, 18. Feb 07, 04:55

Well I see two possibilities, either I'm using the custom wares improperly (which should mean an easy fix...once I can figure out what's wrong), or there's a bug in custom wares. If the latter, I'm sure Cycrow would want to fix it so any testing we can do helps. So yes I can switch to the EMP, but if we can get custom wares working it's a better option. If I dont get this resolved within the next three days or so I'll switch to the EMP.

But now that two people are having trouble with the custom wares in my script, I know it's not isolated, so that's a good thing.

I promise to work hard on this tomorrow (busy tonight). I'll spend a while trying to figure it out myself, and if I have no luck, I'll contact Cycrow. I just want to leave that as a last resort as I know he's very busy.

Thanks for letting me know neumanf15, I'm sure reinhart is relieved as well to know he's not the only one with an issue!

User avatar
defiant1
Posts: 1141
Joined: Sun, 7. May 06, 03:53
x4

Post by defiant1 » Sun, 18. Feb 07, 05:11

nono...im useing the EMP also...i also seem to have some issues with it...i slected a pirate ship and wanted to clame it (pilot wouldnt bail so i wanted to take the ship by extream force) and i couldnt find any option to claim or at least try to claim...and i know i got it all installed properly as with the extra wares thing its enabled too...
Teladi Next Minute Shipping®

neumanf15
Posts: 259
Joined: Mon, 26. Dec 05, 19:55
x3

Post by neumanf15 » Sun, 18. Feb 07, 05:14

Some info that might help... I can find the SCS in LV's add wares... In fact, there are now 16 of them... and it seems to be growing. Last I checked, there were only about 7.
[ external image ]

I've done a couple un/reinstalls of the script since then, but I've also gone back to a backup of my scripts directory from before I installed this, then reinstalled, so who knows what it's doing.

If I add any of those wares above, I get no new commands (I didn't try ALL 16...)

If I add the ware readtext...10253 (the one the pirate station sells), I get the piracy command you described. So, somehow your commands have migrated to the ware I mentioned before (I believe it's an EMP ware).

Hope that helps. I'm a GUI modder & beta tester, not a scripter, so you've reached/exceeded the limits of the help I can give you. i.e., I could be wrong about the ware stuff.

reinhart_menken
Posts: 229
Joined: Sat, 27. Jan 07, 05:23

Post by reinhart_menken » Sun, 18. Feb 07, 05:43

Well, I am indeed relieved and somewhat "glad" to hear that I am not the only...um...case. I am sorry that it means you have more work to do though =/

Thanks for all the efforts you put in anyways :)

Greg_G
Posts: 110
Joined: Tue, 26. Apr 05, 19:15
xr

Post by Greg_G » Sun, 18. Feb 07, 06:07

neumanf15, thanks for the continued excellent information.

I'm looking through the custom wares code now, as this has me fairly distressed. I think it would be very helpful if you two could send me the contents of your 449004.xml found in your t folder by PM.
Last edited by Greg_G on Sun, 18. Feb 07, 06:18, edited 2 times in total.

User avatar
defiant1
Posts: 1141
Joined: Sun, 7. May 06, 03:53
x4

Post by defiant1 » Sun, 18. Feb 07, 06:10

i really dont have much "info" to give except that i cant find an option to actually allow me to tell my ship to begin the claimming prosses (IE I slect menue command that says "claim target" and it goes to work on claimming that ship as best as it can)...other then that ive got nothin to give...
Teladi Next Minute Shipping®

Greg_G
Posts: 110
Joined: Tue, 26. Apr 05, 19:15
xr

Post by Greg_G » Sun, 18. Feb 07, 06:15

defiant1: I don't think you are using the SCS correctly. Please read through the documentation. The command shows up in the Piracy menu as "Ship Claim Software: Activate". If it is saying something else, it means you are using another script. If it does say that, then it takes two parameters for input: (1) a sector, (2) a ship or station called the base of operations the purpose of which is explained in the docs. It does not take a ship to be claimed as input.

Edit: Regarding the custom wares issue reinhart and neumanf15 are having, it's looking increasingly likely that it's a bug in the script installer's custom wares functionality, which is out of my purview. I may have to switch over to the EMP for the SCS, although the CCD will have to remain using custom wares. I'll think on this and likely, after getting neumannf15's t file, will contact Cycrow to see what he thinks.

Edit 2: I've PMed Cycrow about this. Hopefully, when he has time, he can shed some light on this.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Sun, 18. Feb 07, 19:10

neumanf15, the readtext is from an EMP ware, so its got nothing to do with the Custom Wares from the plugin manager, it could be that a script added it there without setting up the text for it.

as for the multiple wares, thats nothing to do with the scripts themselves, more likly its a problem when the ware file was created, do u run any mods, and have u got those mods selected in the custom wares section ?

if so, then it could be a problem with how the plugin manager backs up the existing files. so it thinks the new edited file is actually the old one, so it adds another entry onto that.

im hoping its that, coz if so, then i should be able to create a fix for it, if not, then ill have to look further into it.

Greg_G
Posts: 110
Joined: Tue, 26. Apr 05, 19:15
xr

Post by Greg_G » Sun, 18. Feb 07, 20:12

After a little bit of discussion with Cycrow, he doesn't see anything wrong with my setup script, and this is obviously not related to the main script, so it's possible that there's nothing at all wrong with my scripts. (Yey!) Cycrow did confirm that reinit scripts can do some really weird things with commands (something I had noticed as well) so at least some of reinhart's problems may be related to that. It doesn't explain neumanf15's problems though.

However, I want to get this resolved, so I followed Cycrow's advice and added a little bit of debug output to the setup script. For those having trouble with this, please overwrite the existing script (in the X3 scripts directory) with this one:
http://x3.bitspring.com/files/setup.plugin.scs.xml (Right click->Save Target As...)
The only thing it does is adds a line each time this setup script is run to your logbook (and to log08765.txt) saying whether the setup script worked properly and what ware was assigned to the command, like so:

Code: Select all

Ship Claim System MK1 has been initialized - WARE=Ship Claim System MK1
I appreciate your patience and thank you for your assistance with this.

Post Reply

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