|
|
 |
View previous topic :: View next topic |
 |
|
|
|
|
Author |
Message |
|
|
|
|
|
Bobisback
Joined: 20 Nov 2009
|
Posted: Wed, 21. Dec 11, 22:39 Post subject: |
|
|
is there anyway to easliy add support for other equipment that is added by other mods? like MARS, mefos, travel drive?
P.S nevermind I figured out how to add them I am happy
great mod makes life so much easier thanks 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
jiunejai
Joined: 04 Mar 2011
|
Posted: Tue, 6. Mar 12, 12:21 Post subject: |
|
|
Could anyone teach me how to add new equipment in the setting menu?
I edit plugin.pelador.workshop.ref, but seems not work
EDIT:
I have solved it!
The following are steps to add new equipment into menu:
1. Edit "plugin.pelador.workshop.ref". Add a line for new equipment into $equipment array, you can copy existing one then edit, or insert a new one by yourself.
code form is $equipment [ array number ] = equipment.name
i.e.:
| Code: |
| $equipment [ 32 ] = MARS - Motion Analysis& Relay System |
2. In same script file, edit $include array. To avoid error, give argument for controlling include or not.
code form is $include [ array number ] = 0/1,
notice that 1=include, 0=disinclude.
i.e.:
| Code: |
| $include [ 32 ] = 0 |
3. Edit $no.equipment with "lastest array number +1".
The argument $no.equipment should be found in first 10 lines of follow script files:
plugin.pelador.player.workshop
plugin.pelador.workshop.cfg
plugin.pelador.workshop.ref
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Andyrids
Joined: 16 Aug 2008 Posts: 110 on topic

|
Posted: Mon, 19. Mar 12, 12:06 Post subject: |
|
|
Hi great script !
I have been trying to add the functionality to M6 class (Hyperion) without much success I added :
| Code: |
| or $class == M6 2026 |
To .player.dock.chk.xml at Lines 26 & 39
I gather I also have to add info to the <sval also and update each array size by 6 in the same file ?
| Code: |
<sval type="int" val="131074" />
<sval type="int" val="4" />
<sval type="int" val="12" />
<sval type="int" val="2026" />
<sval type="int" val="15" />
<sval type="int" val="0" />
|
Would that be correct or am I missing something ? since I cant seen to get it to work on my M6, the edits do not break the existing script either so I must be close ?
Thanks.
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Andyrids
Joined: 16 Aug 2008 Posts: 110 on topic

|
Posted: Tue, 20. Mar 12, 11:30 Post subject: |
|
|
Well so far I got it to work on existing M6 & M7's BUT if you spawn a new one or even a new TL or M1 then the "workshop" command is greyed out...
This is what I have so far :
| Code: |
Line 26
<line linenr="014" indent=" "><var>else if </var><text></text><var>$class == M1 2021 OR $class == TL 2032 or $class == M6 2026 or $class == M7 2027 </var><text></text></line>
Line 39
<line linenr="027" indent=" "><var>if </var><text></text><var>$class == M1 2021 OR $class == TL 2032 or $class == M6 2026 or $class == M7 2027 </var><text></text></line>
|
And then further down in the same file :
| Code: |
<sval type="array" size="37">
<sval type="int" val="104" />
<sval type="int" val="-1610609147" />
<sval type="int" val="7" />
<sval type="int" val="131074" />
<sval type="int" val="4" />
<sval type="int" val="12" />
<sval type="int" val="2021" />
<sval type="int" val="15" />
<sval type="int" val="0" />
<sval type="int" val="131074" />
<sval type="int" val="4" />
<sval type="int" val="12" />
<sval type="int" val="2032" />
<sval type="int" val="15" />
<sval type="int" val="0" />
<sval type="int" val="131074" />
<sval type="int" val="4" />
<sval type="int" val="12" />
<sval type="int" val="2026" />
<sval type="int" val="15" />
<sval type="int" val="0" />
<sval type="int" val="131074" />
<sval type="int" val="4" />
<sval type="int" val="12" />
<sval type="int" val="2027" />
<sval type="int" val="15" />
<sval type="int" val="0" />
<sval type="int" val="15" />
<sval type="int" val="10" />
<sval type="int" val="7" />
<sval type="int" val="-1" />
<sval type="int" val="0" />
<sval type="int" val="-2" />
<sval type="int" val="10" />
<sval type="int" val="-4" />
<sval type="int" val="0" />
<sval type="int" val="-5" />
</sval>
|
There is 2 blocks with same code and I edited them both...
The fact that it works with existing ships means I'm on the right track here, there must be some other value I need to increment but not knowing what the other numbers in the sval list relate to is probably the reason why it wont work with a newly spawned ship...
Any help here greatly appreciated

|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Andyrids
Joined: 16 Aug 2008 Posts: 110 on topic

|
Posted: Mon, 26. Mar 12, 07:47 Post subject: |
|
|
Still struggling to get this to work properly, I have been studying <sval> types and values in other scripts that deal with player ships and see similarities but blindly changing the values as one would expect has random catastrophic results at times...
A few pointers / help would be much appreciated guys please 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
NovaStark
Joined: 05 Jun 2012 Posts: 12 on topic

|
Posted: Thu, 7. Jun 12, 20:24 Post subject: |
|
|
ohhhhhh... I had forgotten about this little beauty of a script. Equipping new ships with tunings and software is the bane of my existence. So setting this up asap.
@Andyrids I'm not a scripting wiz when it comes to X3 but if you have it working on existing ships than maybe what is missing is a variable being set on new ships? As in there's a script that runs in the background searching for new player ships at a certain interval (or uses an event/callback) to set this variable based on the criteria you've been modifying?
Anyhow this is just a guess as it would seem simple to check for a variable as each ship docked rather than run it against an array of allowed ships at every single docking.
To put it simply check once and never again. Ships don't usually change classes once created
*edit*
@jiunejai - Thanks for posting your changes! Saved me some time and headache. Just made them myself and it seems to work beautifully. Just a note to anyone else you may have to save/quit/reload to get everything in sync. Before I did I was able to add Mars to a install set but adding the set didn't install Mars and Mars didn't show up in the regular equipment list.
*edit2*
| Andyrids wrote: |
Still struggling to get this to work properly, I have been studying <sval> types and values in other scripts that deal with player ships and see similarities but blindly changing the values as one would expect has random catastrophic results at times...
A few pointers / help would be much appreciated guys please  |
I'm not sure what file you were looking in or what exactly you're trying to accomplish. I didn't see anything that would block the use of the workshop command on any class of ship. The only thing I can figure is that your trying to get the auto equip to work with a certain class?
/shrug. If this is still something you're trying to do I could look at it more, but I kinda doubt it considering the age of your post.
Is the Hyperion even in X3TC?
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Andyrids
Joined: 16 Aug 2008 Posts: 110 on topic

|
Posted: Fri, 8. Jun 12, 09:25 Post subject: |
|
|
Hi NovaStark.... Yes the Hyperion is in TC and the plan was to get this script to work with that ship and also the Griffin... But since I could only get it working with existing ships I decided to delete my version of the script, revert back to the original one and just change ship class to M2 for those two ships...
But you are correct it is just some variable / flag that I am missing upon a new ship of the above mentioned spawning.
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
DrBullwinkle

Joined: 17 Dec 2011 Posts: 3355 on topic Location: Boston, USA

|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Andyrids
Joined: 16 Aug 2008 Posts: 110 on topic

|
Posted: Fri, 8. Jun 12, 14:52 Post subject: |
|
|
| DrBullwinkle wrote: |
| Andyrids wrote: |
| But you are correct it is just some variable / flag that I am missing upon a new ship of the above mentioned spawning. |
After three months... are you *still* trying to edit scripts without using the Script Editor or Exscriptor?
That's like spitting into the wind.  |
With all due respect DrB I do not have the time to learn complex editors especially for what would appear to be quite a simple task... Obviously a task that my mind is to "simple" to complete successfully...
Just as a side note I spent many years building and helping others build UI's for a game called Everquest and do believe even after all this time mine are still in the top 10 most downloaded and used, probably updated now by some of the guys I taught in the past... I have no desire to take that path / steep learning curve again and rather hoped for the good nature of some members here to give me a pointer as to where my mistake lies.... or maybe that was my mistake ? 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
X2-Illuminatus Moderator (Deutsch)

 
Joined: 02 Apr 2006 Posts: 14856 on topic

|
Posted: Fri, 8. Jun 12, 15:14 Post subject: |
|
|
| Quote: |
| I have no desire to take that path / steep learning curve again and rather hoped for the good nature of some members here to give me a pointer as to where my mistake lies.... or maybe that was my mistake ? |
Well, your mistake is that you want to directly edit the script file and the helpful pointer by DrBullwinkle is to use one of the editors.
The Script Editor is even built into the game, so you don't have to download anything. It just needs to be activated.
The Script Editor is designed that way that commands have clear names, often saying what they do, and clear input fields, which can be selected with the mouse and/or arrow keys and Enter.
I would never suggest editing the script files directly in a text/xml-editor to anyone, be it a beginner in MSCI scripting or an experienced scripter.
_________________ Schreibwettbewerb der Kreativen Zone
X-BtF Anniversary Screensaver von TVCD
VAGABUND von arragon0815
FAQ - häufig gestellte Fragen einfach beantwortet.
XDownloads - Upload, Link, Download
"...time it seems does not care if you have stuff to do or not, it just goes by regardless." - Ketraar |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Andyrids
Joined: 16 Aug 2008 Posts: 110 on topic

|
Posted: Sat, 9. Jun 12, 12:34 Post subject: |
|
|
| X2-Illuminatus wrote: |
| Quote: |
| I have no desire to take that path / steep learning curve again and rather hoped for the good nature of some members here to give me a pointer as to where my mistake lies.... or maybe that was my mistake ? |
Well, your mistake is that you want to directly edit the script file and the helpful pointer by DrBullwinkle is to use one of the editors.
The Script Editor is even built into the game, so you don't have to download anything. It just needs to be activated.
The Script Editor is designed that way that commands have clear names, often saying what they do, and clear input fields, which can be selected with the mouse and/or arrow keys and Enter.
I would never suggest editing the script files directly in a text/xml-editor to anyone, be it a beginner in MSCI scripting or an experienced scripter. |
Again with all due respect... Im old school and do not need a script editor notepad2 works just fine.... so to an extent this is just a simple scripting problem.. and as I have stated I do not wish to get into hours of learning just for the sake of a simple mod to an existing mod ? (yes yes yes I know about file types and conversions and how they get messed up and whatever and know the work arounds)
Its quite simple really all I am asking for is with help with the script itself and flags whatever blah blah... I guess I have done most of it.. but since its such a big problem I also guess you rocket scientists do not know how to do it either.. that makes me feel good Im not such a dumass after all...
Its ok guys just go back to whatever it is that you do best and I wish you all well forget my silly problem 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
X2-Illuminatus Moderator (Deutsch)

 
Joined: 02 Apr 2006 Posts: 14856 on topic

|
Posted: Sat, 9. Jun 12, 15:04 Post subject: |
|
|
It somehow amuses me that someone, who built UIs himself, refuses to use one with the explanation that using it would require "hours of learning". But hey, it's your decision. If you want to take the hardest way, feel free to do so. But then, please don't complain that it's difficult or that no one wants to help you.
Anyway, being a rocket scientist myself - thanks for noticing it - I was able to complete this task (allowing M6 ships to be used with this script) by simply doing, what you did, just in the Script Editor.
In case you're still interested in it: Download of plugin.pelador.player.dock.chk.xml over file-upload.net. Download and copy it to the "scripts"-folder of your game directory, so it replaces the existing file. Start the game/load a save and "Allow workshops to be used on ships" in the config menu.
_________________ Schreibwettbewerb der Kreativen Zone
X-BtF Anniversary Screensaver von TVCD
VAGABUND von arragon0815
FAQ - häufig gestellte Fragen einfach beantwortet.
XDownloads - Upload, Link, Download
"...time it seems does not care if you have stuff to do or not, it just goes by regardless." - Ketraar |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Andyrids
Joined: 16 Aug 2008 Posts: 110 on topic

|
Posted: Sat, 9. Jun 12, 15:51 Post subject: |
|
|
| X2-Illuminatus wrote: |
It somehow amuses me that someone, who built UIs himself, refuses to use one with the explanation that using it would require "hours of learning".
Anyway, being a rocket scientist myself - thanks for noticing it - |
My old on-line name is Laffs ... anyway yes they are very complicated as you stated you find it funny that's kool ....
Besides you made me the script anyway ! a bit of reverse psychology does work at times ... Thank you so much for doing so, Much appreciated 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
NovaStark
Joined: 05 Jun 2012 Posts: 12 on topic

|
Posted: Tue, 12. Jun 12, 22:53 Post subject: |
|
|
Well, I can kinda understand where he's coming from a bit. When it comes to editing traditional code/html/etc I too prefer to use a text editor (like notepad++). But seeing as X3 has it's own scripting language and encodes the resulting files as XML it's much easier imo to just use the builtin editor.
Maybe if I was *very* familiar with all the commands and syntax I would use a text editor too, but as I'm a noob I wouldn't dare. Besides, even when coding in a traditional language it's sometimes nice to jump into an IDE to handle large projects or debugging. I guess it boils down to choosing the right tool for the job really.
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
DrBullwinkle

Joined: 17 Dec 2011 Posts: 3355 on topic Location: Boston, USA

|
Posted: Tue, 12. Jun 12, 23:04 Post subject: |
|
|
| NovaStark wrote: |
| Maybe if I was *very* familiar with all the commands and syntax I would use a text editor too |
No, no, no.
It has nothing to do with your experience with other editors. X3 uses xml like a database; it stores ID's rather than text strings. The readable text in scripts is just comments -- it is not the actual code. The real code is numeric ID's, which are, more or less, not human readable.
It is not a matter of which editor you prefer, as in other languages. You really must use an editor made for the job (if you want your scripts to work).
Otherwise, you are just spitting into the wind. 
_________________ Peace through superior firepower
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software (DCS) | Ship Tricks: Mini-Guides (with Video) |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
|
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
 |
|
|
|
|
|