[SCRIPT] Rename Ships with Expressions (v1.4 Feb 1 07)
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
Yep, though I think you don't even need to deinstall the old one, it should just update over the top. I don't actually use the script manager myself though... Just package up my scripts for it. I should figure out the auto-update stuff so you guys can be kept up to date without having to keep track manually.Puruco wrote:oh I forgot, for install the new version just desinstall the old one and install the new one with cycrow installer or need to do something else?
Yup, I'm already on it. All caps & all lowercase will be among the more than 10 new expressions in v1.5Nho wrote:Great job Klyith! I do have a request tho, if I may... Would it be possible to add a command for CAPITAL letters? I use them a lot, it saves time when I'm looking for one specific ship in the R menu
Auto updating scripts is only needed in one case:Klyith wrote: I should figure out the auto-update stuff so you guys can be kept up to date without having to keep track manually.
if the script is currently running on an actor (or globally), like UT trader or a turret command, it will not be loaded from script file but kept in the savegame.
Scripts that are only executed directly by the player are loaded from the file every time you load a game.
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.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
Whoa, I wouldn't need upto 399 in Roman Numerals but thanks anyway Klyith. The release comes at a good time as I just got the new DDRS mod and plan to start a new game.
Out of curiousity though, would the *TA and *TN commands work on new ships? I never got far enough in the mods or Bala Gi to try it
Out of curiousity though, would the *TA and *TN commands work on new ships? I never got far enough in the mods or Bala Gi to try it
Nah mate, I'm talking about the auto update in Cycrow's script manager. It will look on the author's website for new versions of a script package, and do the updates for the user. If, that is, the person putting the package together can figure out how to set it up.Gazz wrote:Auto updating scripts is only needed in one case:
I figured 399 was plenty myself. FYI, new game is totally irrelevant to a script like this. When I get the next update done you can just overwrite the files, no problem. No need for a new game or anything, if you want to update.Whooosh wrote:Whoa, I wouldn't need upto 399 in Roman Numerals but thanks anyway Klyith. The release comes at a good time as I just got the new DDRS mod and plan to start a new game.
Yeah, they will work just fine. (It uses X3's own reporting of the ship name, so as long at it displays properly in the other areas of the game it has no troubles.)Out of curiousity though, would the *TA and *TN commands work on new ships? I never got far enough in the mods or Bala Gi to try it
It even handles my homemade ships just fine, like my Mammoth and Centaur Vanguards and Albatross Hauler.Klyith wrote:Yeah, they will work just fine. (It uses X3's own reporting of the ship name, so as long at it displays properly in the other areas of the game it has no troubles.)Out of curiousity though, would the *TA and *TN commands work on new ships? I never got far enough in the mods or Bala Gi to try it
My X3:R Scripts: Law Enforcement Device MK1 | Turrets Command Cycle | Cargo Cloaking Device MK1 | Ship Claim System MK1
So there I was searching through my ships list, looking if there would be some ST around that I had forgotten to upgrade to UT.
And I thought... why am *I* doing this?
Script powerz activate!
For UT I dont care but ST get labeled with their XP level. =)
And I thought... why am *I* doing this?
Script powerz activate!
Code: Select all
068 $temp = $currentship -> is script 'plugin.autotrade.galaxy' on stack of task=0
069 skip if not $temp
070 $addvar = 'UT'
071 $temp = $currentship -> is script 'plugin.autotrade.sector' on stack of task=0
072 if $temp
073 $temp = $currentship -> get local variable: name='experience'
074 $addvar = 'ST ' + $temp
075 end
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.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
For some reason (I can only assume conflicting scripts) I cant seem to get the colors to work... does anyone know of any scripts that conflict with this? (I am thinking bounty hunter, as it does some stuff with color and whatnot), just would like a second opinion... and/or nuemans gui... everything else works like a champ (excellent btw) just the color string does nothing for me.
All the other text is fine? That is, you're not getting any readtext errors anywhere?Kazuma wrote:For some reason (I can only assume conflicting scripts) I cant seem to get the colors to work... does anyone know of any scripts that conflict with this? (I am thinking bounty hunter, as it does some stuff with color and whatnot), just would like a second opinion... and/or nuemans gui... everything else works like a champ (excellent btw) just the color string does nothing for me.
I don't think it could be conflicting scripts unless the other script was also trying to rename your ships... And even then, you should at least see the changed name for a minute before the other script changes it back, unless the other script is renaming way too often.
Can you post the rswe string you were trying to use?
Sure K,
Remote select 1 of 2 in space M6 ships;
commands/general/RsWe Sector
Sector
M6
*CL *TN (this works, I get M6 whatever, and M6 whatever)
if I expand this to lets say;
*CL *TN *KR (does the above, just no color)
Mayhap I missed something, dunno; thought I would ask the expert on it.
As far as errors, I dont get any; and or havnt recieved any at all; the ships are also keeping there names assigned via *CL *TN and not reverting back... just no color differentiation... ie. there still the standard grey/white generic'o type color.
The only style of scripts I can think of that I have in action are the group commands (which can do ships of a type and form a flight group, would have to look which script that is), maybe the early warning sats (that will rename sats)... other then that... I dont have anything 'hanging out there' that auto controls the naming of meh stuff. Thanks for the help!
Remote select 1 of 2 in space M6 ships;
commands/general/RsWe Sector
Sector
M6
*CL *TN (this works, I get M6 whatever, and M6 whatever)
if I expand this to lets say;
*CL *TN *KR (does the above, just no color)
Mayhap I missed something, dunno; thought I would ask the expert on it.
As far as errors, I dont get any; and or havnt recieved any at all; the ships are also keeping there names assigned via *CL *TN and not reverting back... just no color differentiation... ie. there still the standard grey/white generic'o type color.
The only style of scripts I can think of that I have in action are the group commands (which can do ships of a type and form a flight group, would have to look which script that is), maybe the early warning sats (that will rename sats)... other then that... I dont have anything 'hanging out there' that auto controls the naming of meh stuff. Thanks for the help!
Nice script. I was working on something similar but with more features:
1) Put current ship task into name (using top script name). It would be VERY usefull to know what exactly task a ship perfroms (UT, sector trading, (multi)sector convoy, fleet support, etc.).
2) With regard to 1) a job is required to check ship tasks by timeout and change name if required.
3) Ship weapons/speed/shields info. This is very usefull when you are fighting in some sector with large fleet My idea was to divide all weapons into 3 groups: heavy (HEPT, PPC, FAA), medium (PAC, PSG) and light (IRE, PBE, MD). So name of fighter may looks like that: "M5 (Leader) 200 5 L5 - 3". This means: M5, belongs to "Leader', speed 200, shileds 5MJ, 5 ligth weapons, UID = 3. It is not so hard task to check M1, M2, M6 (since there are just several ships of these classes) but check 50+ fightesr for proper config... thats a nightmare for me.
If you impelement the all above I'll fo sure throw away my script and use your one
1) Put current ship task into name (using top script name). It would be VERY usefull to know what exactly task a ship perfroms (UT, sector trading, (multi)sector convoy, fleet support, etc.).
2) With regard to 1) a job is required to check ship tasks by timeout and change name if required.
3) Ship weapons/speed/shields info. This is very usefull when you are fighting in some sector with large fleet My idea was to divide all weapons into 3 groups: heavy (HEPT, PPC, FAA), medium (PAC, PSG) and light (IRE, PBE, MD). So name of fighter may looks like that: "M5 (Leader) 200 5 L5 - 3". This means: M5, belongs to "Leader', speed 200, shileds 5MJ, 5 ligth weapons, UID = 3. It is not so hard task to check M1, M2, M6 (since there are just several ships of these classes) but check 50+ fightesr for proper config... thats a nightmare for me.
If you impelement the all above I'll fo sure throw away my script and use your one
Aha! You're using it wrong, but I suppose that was my fault since I didn't fully explain how to use the colors anywhere. I will add it to the readme.Kazuma wrote:*CL *TN *KR (does the above, just no color)
Colors are like html or bbcode tags: they only colorize the text after them. So when you tried *CL *TN *KR, the red was at the end of the text and didn't colorize anything. To make the whole name in red, you need to do "*KR*CL *TN", with the color expression at the beginning of the name.
Some examples:
*KR*CL *TN . . . . . M3 Nova Raider
*CL *KR*TN . . . . . M3 Nova Raider
*KR*CL *KX*TN . . M3 Nova Raider
*KR*CL *KB*TN . . M3 Nova Raider
Note also that the spaces between the color and the rest of the string. RSwE preserves all spaces, so if you put spaces around any *expression, they will show up in your final name. Most of the time it's easy to predict what will happen, but some of the expressions don't make any visible text in the final name.
Both are coming in version 1.5. The ship job feature is coming along, but complicated by the fact that it doesn't just go by what script the ship is running. 1.5 will also have a new renaming function that runs in an additional ship command slot, and periodically renames the ship.-IH- wrote:1) Put current ship task into name (using top script name). It would be VERY usefull to know what exactly task a ship perfroms (UT, sector trading, (multi)sector convoy, fleet support, etc.).
2) With regard to 1) a job is required to check ship tasks by timeout and change name if required.
However, it's going to be a little while... Besides a ton of new expressions, I'm also doing a ton of refactoring on the code to improve performance. RSwE is currently a real hog of a script. It's not that big of a deal normally because it only runs one time at the player command. But if I add the periodic rename task, it needs to go faster.
I've also been very busy with RL recently, plus we got 20 inches of snow last week to make life difficult. What spare time I have isn't in big enough chunks to do any useful coding.
Lovely idea, but I don't think I can do this. Shields & speed wouldn't be hard, but the weapons thing is just too context dependent. A much better thing would be a new script that makes a report for how your ships are outfitted, and highlights those that don't have full kit.3) Ship weapons/speed/shields info.
Aha! You're using it wrong, but I suppose that was my fault since I didn't fully explain how to use the colors anywhere. I will add it to the readme.
Well that explains that! Thanks Klyith (again) for this most excellent work! (Why this thing isnt signed is beyond me). While toiling away at work I had thought to myself "im probably coloring the damn spaces or somesuch) <laf>
I haven't submitted it for testing or signing. Been toying with the idea, but I don't know if another official bonus pack is going to come out. Plus, you need to have a script in more or less stable form before you submit it, and rswe has plenty of new features on the drawing board.Kazuma wrote:(Why this thing isnt signed is beyond me).
-
- Posts: 275
- Joined: Fri, 6. Feb 04, 20:16
-
- Posts: 30
- Joined: Thu, 1. Mar 07, 09:12
That's it - I'm going to activate the script editor just to use this script! just what I've been looking for...
One request, though - is it possible to add something mid-way between *TA and *TN? I generally have (eg) 'Nova-R' for ship variants... given the way you're doing this in *TA code, this would have to know all the possible variant names available (Raider, Vanguard, etc) so it would be a bit of a pain.
Also, is there any way for it to distinguish between standard and pirate variations of the same ship type? As far as I can tell, it would currently call (for example) pirate novas just plain 'Nova'. Perhaps a special *PR tag that adds in 'Pirate'?
One request, though - is it possible to add something mid-way between *TA and *TN? I generally have (eg) 'Nova-R' for ship variants... given the way you're doing this in *TA code, this would have to know all the possible variant names available (Raider, Vanguard, etc) so it would be a bit of a pain.
Also, is there any way for it to distinguish between standard and pirate variations of the same ship type? As far as I can tell, it would currently call (for example) pirate novas just plain 'Nova'. Perhaps a special *PR tag that adds in 'Pirate'?