Shovinus' Script List

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

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

Did you see this poll?

Yes
14
54%
No :)
12
46%
 
Total votes: 26

User avatar
Shovinus
Posts: 560
Joined: Sat, 9. Dec 06, 20:19
x3

Shovinus' Script List

Post by Shovinus » Fri, 23. Feb 07, 05:36

Empire Viewer 1.020 downloaded 309+ times
Allows user to quickly and easily see stats on their empire (Please give any ideas you may have as to what to add to the list)
Dock Upgrade Manager 3.048 dowloaded 876+ times
Add upgrades such as Trade Command Software Mk1 to your docks, just like normal docks, also automatically upgrade docked ships
Player Owned Shipyards 1.050 dowloaded 502+ times
Allows you to buy and manage your own shipyards, you can reverse engineer/build any station/ship in the game so long as you can get it to the shipyard.
Defend Your Base 1.050 dowloaded 84+ times
Mini Game you can run when bored, deffend your titan against larger and larger waves of enemies, how far can you get?

Latest T files
Because all my scripts use the same T file if you have an old version it can mean more than one of the scripts don't work properly so below are a list of the latest versions.
English - 448789
German - 498789 translated by DSE [ITF](only for EV)
Russian - 78789 translated by ChemODun(only for DUM)


If anyone can translate more please PM me



:::NOTE::: To all downloaders, make sure you back up your save games before installing any new script, if the script messes up your game it is not always reversible.
If you install a script, test it as much as you can as soon as you can, that way you wont get halfway through playing til you find something you want to do but can't because the script has wrecked it.
This is not a particular warning about my scripts, even though there may be mistakes but a general warning that should be considered even when downloading from hardened pro's, everyone gets things wrong :).





































































































.1227 ps for those wondering the poll is only there to help me find this topic if I lose it.
The posts below are from an old topic now dead, I changed this to show my scripts so it would be more useful.
Last edited by Shovinus on Wed, 13. Aug 08, 16:20, edited 110 times in total.

russbo
Posts: 858
Joined: Sat, 12. Nov 05, 22:53
x4

Post by russbo » Fri, 23. Feb 07, 06:47

What does it do? (Haven't seen version 1...)

User avatar
Shovinus
Posts: 560
Joined: Sat, 9. Dec 06, 20:19
x3

Post by Shovinus » Fri, 23. Feb 07, 07:51

sorry I should have put more information down :)
Last edited by Shovinus on Wed, 28. Feb 07, 06:24, edited 2 times in total.

User avatar
LV
Sith Lord
Posts: 6362
Joined: Wed, 6. Nov 02, 21:31
x3tc

Re: [Script] Equipment Installer

Post by LV » Fri, 23. Feb 07, 13:50

Shovinus wrote: Hope you find it useful, and I'm sorry if I annoy you all, like LV says, I'm a beginner, and somewhat child like :) please be patient with me.
I never called you child like, if i had to pick a term it would be "eager beaver" :)

I don't have any green splashed over me so feel free to ignore the following advice but as someone who's been around for a while and also knows how this forum ticks it would be prudent to follow or you may start to annoy people.

If you need to ask a specific question to a single member use the PM button (if your not sure how to use the PM ask)

When you post a script add the information what the script uses like command slots and t file id's (again if your not sure how to do this after reading the stickies ask) Not many people will touch this script unless they know it will not conflict with one they have already installed. Have a look at how long standing scripters setup their script posts for how it works and what it uses as a template.

Try to work out an issue before posting a new thread as it is annoying to read someones new post only to see they worked out the issue within 5 mins of posting it ;)

If you have a thread that is asking questions already posted use that one to ask the new quesion.

Nobody really cares about new update threads saying my script is nearly done.

Try not to post reply after reply so the first 3/4 posts are all from you, edit your post instead.

I know exactly how much the pressure to post is like when you have created your first masterpiece as i like all other once were in the same position.

Finally, good luck with the SE, if you need help we will give it as long as you try to use the existing help already on the forum and you keep your posts below excessive.

Feel free to ignore all the above as this is only the way i see things but i do believe most others follow this example.

LV :)
LV's TC Scripts
Readme's For All My Scripts


I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced

si tacuisses, philosophus mansisses

User avatar
Shovinus
Posts: 560
Joined: Sat, 9. Dec 06, 20:19
x3

Post by Shovinus » Fri, 23. Feb 07, 16:49

To anyone who installed this earlier, I am sorry, I found an error and so have reuploaded the amended file, please download and reinstall.

B-O'F
Posts: 719
Joined: Sat, 21. Feb 04, 03:15
x3tc

Post by B-O'F » Fri, 23. Feb 07, 19:51

Hi Shovinus,

I have not tried your script, as I use my own (originally written for X2 and updated).... but some information that may assist you..

In your showupgradequestion you state that you have multiple messages as there is a limit of 5 variables for a question. This is true, to a certain extent. There is a limit to a single formatted string, but you can add the strings together to have as many inputs as you like:-

$m1 = sprintf: pageid=99996 textid=2, null etc
$m2 = sprintf: pageid=99996 textid=3, null etc
$m3 = sprintf: pageid=99996 textid=4, null etc
$m4 = sprintf: pageid=99996 textid=5, null etc

$message = $m1 + $m2 + $m3 + $m4

show $message (whichever version you choose)

This will give you 20 choices.

For a version that uses a loop to set up the choices - that can easily cope with 60 or 70 choices, have a look at my Remote Docked Freight Transfer.
This can also give the index number of the ware (as required in shoupgrader, which can be tied to the price and ware name in two arrays)

To get round the problem of wares that have a limit - Cargo bay extensions, Engine Tuning and Rudder Optimisation - here are a couple of ways that I thought of:-

1) A continuously running script to check if you try to install one of these wares, and limit the amount. Not a good idea as it would be a large overhead.

2) A script that is run to check the maximum allowed number of upgrades when you select one of these wares - possibly the easiest.
Again, have a look at my script to see how I managed it, it is not too difficult, and is fairly well documented.


Infinite loop detection - leave it in. If something goes wrong with your script it will give an error message. The alternative is a complete lockup, which requires a power off if the loop is tight enough to stop alt-tab - I have done this.....

Dead error checking code - as it is impossible to select an incorrect value - leave it in until the script has been fully checked and tested under all circumstances... better safe than sorry.

Suggestion for your messages - you have them all with a pageid=9998.
If you have to change the pageid because it clashes with some other script, then you have to change every single message..
A much easier method is to define $pageid = 9998 at the beginning of the script, and use pageid=$pageid in your messages. Then if you want/need to change the pageid, you only have to change it in one place. If you have multiple scripts, then save the value in a global variable or array.

It also looks as though a lot of work could be saved by using more loops and arrays. More to learn....

These are not criticisms of your work, but are alternate ways round problems. You do not have to take any notice of these suggestions, but if you want to learn, at least look at them. If you don't want to learn, then ignore all that I have said.

It seems that I am pushing my script, but that is a place where I have already solved the problems you are having, and it is available for you to look at, copy, or whatever.

Being child-like is to never lose the wonder and the why - keep asking why? until you get the answer that satisfies you.. If growing up means losing the wonder and why - I decided not to grow up. Growing older I can't control, just have to live with that...

Boron - Ol Fh'art
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.

User avatar
Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Fri, 23. Feb 07, 20:02

B-O'F wrote:2) A script that is run to check the maximum allowed number of upgrades when you select one of these wares - possibly the easiest.
How does that deal with the "official" free engine tunings and the likes?
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.

Nho
Posts: 180
Joined: Fri, 24. Feb 06, 19:19
x3

Post by Nho » Fri, 23. Feb 07, 20:40

Very usefull script I have to say. Looking forward to have the engine tunning etc option.

I may have noticed a problem tho, but maybe it comes from me - as i have been toying around between the activation of the restock and reloading the game. When I reloaded, the restock option wasnt working anymore and I had to restart this option. I'll tell you next time I can if it keeps doing that when I reload the game.

Also I was wondering if it was possible to add some options to this script: If you install, let say the 25mj shield - but you have a 25mj shield factory somewhere, you then have the option of selecting a ship and your 25mj shield factory when you activate the auto restock. The script will then order the ship to restock your station with the shields from you factory.

Keep up the good work!

B-O'F
Posts: 719
Joined: Sat, 21. Feb 04, 03:15
x3tc

Post by B-O'F » Fri, 23. Feb 07, 21:52

Hi Gazz,

You wrote:-
How does that deal with the "official" free engine tunings and the likes?
The answer is that it doesn't, as it is not relevant. If the 'official' extras take you over the limit, then it should not be a problem, as they are not removed - it just means that you cannot add any more.

My suggestions were for the 'standard' wares and Dock. Extras that have been thrown in by Ego just make things more difficult - that will be the next stage in the learning process.

All scripts/scripting for X3 is a learning process, as not all the command are fully documented, and some do not work as documented - as you have already found with certain characters in comment lines....

My suggestions were just that - suggestions to make a script possibly better, more robust, and more flexible. For example:- with an array new wares can be easily added via a single line append, rather than having to rewrite the whole script to add extra if - else if commands.

Also, as I said earlier, identifying $pageid in the beginning means that it can be changed easily, rather than having to change every message.

Some things are just 'good habits' to get used to, in order to make life easier - such as good use of comments and white space to make reading easier - which shows in the code above by Shovinus.

Boron - Ol Fh'art
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.

User avatar
Shovinus
Posts: 560
Joined: Sat, 9. Dec 06, 20:19
x3

Post by Shovinus » Fri, 23. Feb 07, 22:42

Hey, cheers B I quite agree, when I first started writing this I thought I would only need 1 list and as I don't really know how to set up arrays yet (haven't looked at them) I never bothered, then I found I needed them again but thought it would be last time so I just rewrote, next time I will know better :) like you say, it is a learning process.

Can you show me the link to your script?

Next I plan to make engine tunings useable and rudder optimisation, and also add a short mission that will activate the option to install, because at the moment you just automatically have the option, so it is better if there is a story behind it.

I was thinking something like:

You get hailed by the Borons who ask you to go and look for a fellow Boron who is late. You are told to check at the a different dock, upon arriving there they tell you he left with the new Equipment Installer, with plans to fly to a different sector, when you arrive in the sector you receive a hail calling for help, it is the Boron fighting off some pirates, so long as you manage to fight off the pirates, he then becomes your friend with the firm belief you have saved him, and offers to help you install equipment at your dock.

Maybe someone with more imagination can think of a better story, infact please do, don’t make it too hard for me to script though :)

Nho when you say, it isn't working do you mean there is no option for it? Or when you select it, it doesn't do anything? Also by reload do you mean save then load or just start from new?

As for the 25mj etc option, I think there is a script that does that, If not I will try, if I did make it, it would not be directly linked to the equipment installer.

Nho
Posts: 180
Joined: Fri, 24. Feb 06, 19:19
x3

Post by Nho » Fri, 23. Feb 07, 22:46

I meant, when I load a saved game where autorestock was running, it is disabled. I have to reactivate autorestock. Not a big trouble tho...

User avatar
Shovinus
Posts: 560
Joined: Sat, 9. Dec 06, 20:19
x3

Post by Shovinus » Fri, 23. Feb 07, 23:03

Hmmm, I don't really know why it does that, but as long as you can reactivate I don't suppose it is a big problem, especially as you only need to restock if you actually want to install, in which case you would know straight away that it wasn't restocking.

Anyway keep posting but for now I must go, I am going drinking

B-O'F
Posts: 719
Joined: Sat, 21. Feb 04, 03:15
x3tc

Post by B-O'F » Fri, 23. Feb 07, 23:55

Hi Shovinus,

Write your own background story, and keep evertything in context - it is your script - your imagination, your work (and learning can count as work). Your background story fits in with what you want to do - all you have to do now is to script it ( hah - ALL you have to do...).

My script is in the stickies, Remote Docked Freight Transfer - use any parts of it that you want to, just change the names so that it doesn't break the script (if anyone is using it).

The main thing is to enjoy whatever you are doing...

Boron - Ol Fh'art
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.

User avatar
LV
Sith Lord
Posts: 6362
Joined: Wed, 6. Nov 02, 21:31
x3tc

Post by LV » Sat, 24. Feb 07, 00:16

B-O'F wrote: The main thing is to enjoy whatever you are doing...
I couldn't put it better myself.


I also see you have changed your OP for looking like you threw a tin of paint at it to a pretty well formatted post. Never underestimate presentation of your work, 100hrs ingame can be of 0 interest on here if you don't present your scripts well. (I know through experience)

a few more tips

Code: Select all

003   global script map: set: key=STATION_UPGRADE, class=Dock, race=Player, script='shoupgradequestion', prio=1 
your script should always start plugin. // eg plugin.shoup.grade.question

this is something you really should get into early on, not only does it let other scripters see your plugins but it will help you keep different scripts and plugins separate

Code: Select all

001   set global variable: name=$station999 value=[THIS]
if your using a GV the always have your name/initials in it so there is 0 chance of another scripter using the same variable. eg set global variable: name=$shov.station999=[THIS]

Code: Select all

send incoming question $m to player: callback='shoupgradequestion2'
plugin.shoupgradequestion2

now finally you don't need to post code unless it's broken it will scare off non scripters from your work especially in the OP ;) (nicely formatted though) and if you have ftp access pm me and i'll show you how to link your entire script via hyperlink which is much easier to get help from.

:thumb_up:

Image
please don't tell me your blue and white shite :sceptic:
LV's TC Scripts
Readme's For All My Scripts


I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced

si tacuisses, philosophus mansisses

User avatar
Shovinus
Posts: 560
Joined: Sat, 9. Dec 06, 20:19
x3

Post by Shovinus » Mon, 26. Feb 07, 19:33

Hey B, hey LV

Yes LV, but then again if I hadn't posted my script code you wouldn't have told me all those pointers, which is really the main reason I did it :D

Yeh, I think writing the story will take longer than the installer did :p

Cheers for the pointers LV

I will make sure I use plugin. next time, to be honest I normally do, but because the names are easier to find with sho at beginning (they all go to the bottom) I kept using sho, then when it came time to package it, I did not want to have to relocate every script, so next time I will just have to use plugin at the start.

Post Reply

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