[Discussion] Generic X3TC S&M questions III

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

Post Reply
jlehtone
Posts: 21794
Joined: Sat, 23. Apr 05, 21:42
x4

[Discussion] Generic X3TC S&M questions III

Post by jlehtone » Fri, 4. Mar 11, 22:25

Post all the short and simple questions (not covered by existing threads) about scripting, modding, and MD in X3 Terran Conflict here. This is third part of the discussion. The previous part can be found here. The oldest part can be found here.

There is a separate thread: "What provides/causes feature/bug foo?" for collecting that subset of questions and answers.

There is a separate thread: What S&M are recommended/"must have"? for collecting that subset of questions and answers into one convenient spot.

User avatar
XDrake
Posts: 133
Joined: Wed, 29. Oct 08, 18:48
x3tc

Removing Ship From Property Menu through scripting?

Post by XDrake » Sat, 5. Mar 11, 18:10

Is there a way to remove a specific ship from the Property Menu through a script and not manually setting it?
XDrake
-------------------------------------------------------
NECORE Inc.

User avatar
EmperorJon
Posts: 9378
Joined: Mon, 29. Dec 08, 20:58
x3tc

Post by EmperorJon » Sun, 6. Mar 11, 15:57

Wow, number 3!


@Drake I assume you mean, hide from property menu equivalent? No.
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Mon, 7. Mar 11, 02:58

there is, but it is a really crappy workaround: assign the ship to another race - works fine for hiding a single ship without anything to do, but is not good for filter functions...
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

cluian
Posts: 176
Joined: Thu, 2. Mar 06, 15:10
x3

Post by cluian » Fri, 11. Mar 11, 15:09

In which file can I modify the range of satellites?
Aus der Versenkung zurück ;D

User avatar
s9ilent
Posts: 2033
Joined: Wed, 29. Jun 05, 01:45
x4

Post by s9ilent » Tue, 15. Mar 11, 09:33

@cluian

I thought someone with more experience in the matter would respond first, but I'm quasi certain (~65%) certain it's in globals.txt
(Just check from the latest cat/dat backwards, I'm sure youll find it, thou I dont know if it's in the root, or in the t or the types folder - probably the root/types)

Mizuchi
Posts: 806
Joined: Thu, 10. Feb 11, 05:48

Post by Mizuchi » Sun, 3. Apr 11, 18:22

s9ilent wrote:I'm quasi certain (~65%) certain it's in globals.txt
(Just check from the latest cat/dat backwards
Correct on both counts. :)

It's in Types. If you're using X3 Editor, you'll need to open it up with the Text Viewer (under the [All] tab), rather than the [Suggested] TDebugger.

From there, you need to edit the SG_SCANNER_RANGE values to whatever you like and save it again.

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

Post by Cycrow » Sun, 3. Apr 11, 19:25

if ur using the latest plugin manager, u can switch it to advanced mode and u'll get direct access to editing the globals

just set the value u want and it'll be applied to the game

Varek Raith
Posts: 329
Joined: Thu, 23. Aug 07, 21:33
xr

Post by Varek Raith » Tue, 5. Apr 11, 00:46

AI M7Ms spawn with boarding pods. Completely useless and takes away space for torpedoes. Is there anyway I can prevent AI ships from spawning them?

Rod696
Posts: 14
Joined: Mon, 19. Sep 05, 23:24
x3tc

Post by Rod696 » Tue, 5. Apr 11, 16:10

I recently installed XTC and I do enjoy the mod, but I am wondering if there is a way to incorporate the other sci fi genre ships into this game.

I tried using the Plugin Manager but the ships did not show up in the build list in the game. Suggestions would be appreciated!

-Kain

User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths » Tue, 5. Apr 11, 16:53

Varek Raith wrote:AI M7Ms spawn with boarding pods. Completely useless and takes away space for torpedoes. Is there anyway I can prevent AI ships from spawning them?
There is the Enhanced Equipment Spawner (EES), but be careful what you wish for :)
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams

Varek Raith
Posts: 329
Joined: Thu, 23. Aug 07, 21:33
xr

Post by Varek Raith » Tue, 5. Apr 11, 21:41

Roger L.S. Griffiths wrote:
Varek Raith wrote:AI M7Ms spawn with boarding pods. Completely useless and takes away space for torpedoes. Is there anyway I can prevent AI ships from spawning them?
There is the Enhanced Equipment Spawner (EES), but be careful what you wish for :)
That works great. Tired of M7Ms not shooting at me. :lol:
Now, I have to figure out how to get MD spawned ships to use that...

User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths » Tue, 5. Apr 11, 22:54

Varek Raith wrote:
Roger L.S. Griffiths wrote:
Varek Raith wrote:AI M7Ms spawn with boarding pods. Completely useless and takes away space for torpedoes. Is there anyway I can prevent AI ships from spawning them?
There is the Enhanced Equipment Spawner (EES), but be careful what you wish for :)
That works great. Tired of M7Ms not shooting at me. :lol:
Now, I have to figure out how to get MD spawned ships to use that...
That is something I have had floating at the back of my mind for a while, but unfortunatly it is not at the top of my list of modding priorities for now. I have some ideas, just not had a chance to investigate them properly... if you want to look into it yourself then I can brief you on my ideas so far, just PM/MSN me to discuss it.

I do plan to try and address the issue with my Changeling tool, which I plan to have it replace the relevant MD/MCSI equipment calls with calls to EES where appropriate.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams

User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious » Wed, 13. Apr 11, 14:34

Is there any way to get the price for selling a ship (to a given race for a given notoriety)?

'get average price of ware $ship.ware' returns just the average (obviously). 'get price of ware $ship.ware' only appears to return the price the SY sells ships for (and only if they're a listed ware). '$someship->sell 1 units of ware $ship.ware' doesn't appear to credit the player account.

mailleweaver
Posts: 76
Joined: Wed, 4. Nov 09, 04:39
x3tc

Post by mailleweaver » Mon, 18. Apr 11, 04:59

Is there a MSCI command to tell a ship to drop wares? The 'unload' command apparently only works in stations.

Also, is there a way to make ships with (modded) ST cargo capacity able to buy stations without changing the ships' class to TL?

User avatar
EmperorJon
Posts: 9378
Joined: Mon, 29. Dec 08, 20:58
x3tc

Post by EmperorJon » Fri, 22. Apr 11, 22:35

Quick question regarding object types and such... is there any way to get one converting from a string?

EG. The player types in Mammoth and I can spawn a Mammoth or say "This is not a recognised object", without me having to harcode the entire thing? As far as I can see... it's not possible... :(
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______

mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren » Sat, 23. Apr 11, 08:02

Yes, but it's a workaround (as usual).

Get input string, say Mammoth, then cycle through all the object types and do a temp convert object type to string and check that string for match against the input string. Wollah, create object type Mammoth, or send back to player "This is not a recognised object" if no match found.


MarCon

User avatar
EmperorJon
Posts: 9378
Joined: Mon, 29. Dec 08, 20:58
x3tc

Post by EmperorJon » Sat, 23. Apr 11, 09:06

I thought it'd come to that. Doesn't seem that bad actually.


I'm working on a fleet creator that can be used to create a fleet in game and out of game. You can type it directly into the T file, or it exports into a log file and then you can move it in. Should be, er... 'fun'.
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______

User avatar
s9ilent
Posts: 2033
Joined: Wed, 29. Jun 05, 01:45
x4

Post by s9ilent » Sat, 23. Apr 11, 14:39

*omg* l3+ ideas is temporarily closed :O

In any case, I'm posting this here (next best thing) as I will probably forget if I dont.


Idea: Provide better debug support, i.e. Instead of just debug log, and debug trace, provide the ability to put break points in scripts, and have a level of debug between log and trace (i.e. debug break- where it will only stop at the pre defined break points).
As often you want to debug after loops, but don't care about the loop it self (or any intermediate scripts that you call)

User avatar
EmperorJon
Posts: 9378
Joined: Mon, 29. Dec 08, 20:58
x3tc

Post by EmperorJon » Sat, 23. Apr 11, 21:54

I can't remember, but you could remove the ware and make it in a crate outside.


Now, a head scratching problem for me... :S



I have a fleet. It is stored in an array, as ship names and numbers and such.

Now, I want to have an array for each of those (groups of) ships. This stores equipment.

The problem I have is this... dynamically creating the arrays for ship equipment. None of this is saved in GVs or anything, it's all kept in a big open menu. It's only there when the menu is open. So... once I try to equip ship 1, I need an array called, say Equip1. Then for ship 2, Equip2, etc.

Short of making the arrays a global variable (and removing them on closing), I can't think there's another way of doing it... any help?
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______

Post Reply

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