[Discussion] Generic X3TC S&M questions I
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 6
- Joined: Thu, 6. Mar 08, 17:48
-
- Posts: 2033
- Joined: Wed, 29. Jun 05, 01:45
-
- Posts: 6
- Joined: Thu, 6. Mar 08, 17:48
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
The mission director can directly rename sectors AFAIK.
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.
-
- Posts: 181
- Joined: Fri, 14. Aug 09, 07:46
-
- Posts: 876
- Joined: Wed, 18. Feb 04, 19:12
I may be jumping in at the deep end here, but I want to get into scripting for TC and I always learn best if I have a goal I can aim for, something specific to learn how to do. That said, would it be possible to make player-useable jump beacons? At this point I just want to know if it's feasible, rather than how to do it.
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
Yes.
You just couldn't select them with the hardcoded jump shortcut because obviously they are no jumpgates.
You'll need to find a way to select those beacons without much hassle. The rest isn't terribly hard.
My Autojump script lets the player jump to... places... and you could use a similiar approach for your beacons.
You just couldn't select them with the hardcoded jump shortcut because obviously they are no jumpgates.
You'll need to find a way to select those beacons without much hassle. The rest isn't terribly hard.
My Autojump script lets the player jump to... places... and you could use a similiar approach for your beacons.
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.
-
- Posts: 2033
- Joined: Wed, 29. Jun 05, 01:45
Q: What is the best way to create a ship (Here my out, I've become a bit noobish at ship creation)
What I want to do is create several types of ships, with no scenes or bodies, that are just "place holders" in space, with different ranges of health (e.g. 1000hp, 10 000 hp, 100 000 hp) (yes I realise that bodiless objects can not be hit -by lasers)
What is the best way to make them such that they are compatibility and easily added and all that other good stuff? I plan to use the objects in scripts later, so I'll need a way to search for the objects in the list (and efficiency is important)
Initially I did consider the Plugin managers ship creator, but I was hearing that it had TC issues a while back, and when I tried using it, it would complain that I needed scenes/bodies (In short, it doesn't like empty ships, and it keeps asking me to locate x3!)
What I want to do is create several types of ships, with no scenes or bodies, that are just "place holders" in space, with different ranges of health (e.g. 1000hp, 10 000 hp, 100 000 hp) (yes I realise that bodiless objects can not be hit -by lasers)
What is the best way to make them such that they are compatibility and easily added and all that other good stuff? I plan to use the objects in scripts later, so I'll need a way to search for the objects in the list (and efficiency is important)
Initially I did consider the Plugin managers ship creator, but I was hearing that it had TC issues a while back, and when I tried using it, it would complain that I needed scenes/bodies (In short, it doesn't like empty ships, and it keeps asking me to locate x3!)
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
The Complex Cleaner does just that. It locates "it's" objects automatically by comparing the object names to the TFile entries.
That way these objects can be appended to any TFactories without fuss.
That way these objects can be appended to any TFactories without fuss.
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.
-
- Posts: 1399
- Joined: Wed, 6. Nov 02, 20:31
Yep DAD has drones that deploy them for use aswell as many other features.Goldfinch wrote:I may be jumping in at the deep end here, but I want to get into scripting for TC and I always learn best if I have a goal I can aim for, something specific to learn how to do. That said, would it be possible to make player-useable jump beacons? At this point I just want to know if it's feasible, rather than how to do it.
-
- Posts: 2033
- Joined: Wed, 29. Jun 05, 01:45
Q: Which ship types indexes are used for hard-coded stuff?
(e.g. Astronought is at 267, ->273 other misc special objects, 294 freight drone, 319-321 new mines, 220 keris, 31 fighter drone mk2)
290 2nd laser tower?
368 terran laser tower?
Context: Mod total conversion, working from a blank t-ships file, trying to figure out which ones should be reserved.
Q2: Am I correct in assuming that: in X3TC that these special objects are still referenced by their subtype == index in the ships file?
(e.g. Astronought is at 267, ->273 other misc special objects, 294 freight drone, 319-321 new mines, 220 keris, 31 fighter drone mk2)
290 2nd laser tower?
368 terran laser tower?
Context: Mod total conversion, working from a blank t-ships file, trying to figure out which ones should be reserved.
Q2: Am I correct in assuming that: in X3TC that these special objects are still referenced by their subtype == index in the ships file?
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
Yes.s9ilent wrote:Q2: Am I correct in assuming that: in X3TC that these special objects are still referenced by their subtype == index in the ships file?
Q: Which ship types indexes are used for hard-coded stuff?
All fighter/freight drones, lasertowers, mines, satellites.
Hands off those ships and the tech wares associated with them.
Ammo is not special. It's merely whatever ware index the laser is told to gobble up.
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.
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
Oh, hi dudes!
I once wrote this in a tutorial:
When I wrote that, I hadn't yet ran into this problem:
When a selection in your menu is supposed to be either TRUE or FALSE, and the result happens to be FALSE, the command recieving the argument array thinks you didn't supply anything and asks you the question again, thus defeating the purpose of the menu in the first place.
Has anyone else ran into this? Know something I've done wrong?
I once wrote this in a tutorial:
Litcube wrote:Here's another tip:
Code:
set ship command preload script: command= BE_AWESOME script= Menu.BeAwesome
Code:
global script map: set: key= BE_AWESOME, class=Ship, race=Player, script=Cmd.BeAwesome, prio=0
The preload command is very useful for those command scripts where you want to initiate a menu before launching the action.
Whenever the COMMAND is called, the script specified using the PRELOAD code line will launch *prior* to launching the regular global map key. What's unique about this, is that you can use the pre-loaded script to return arguments to the regularly scheduled script so that there's a seamless interface between menu and script command. Use this command at the end of your preload script (Menu.BeAwesome) to set the variables of the command script:
Code:
$BeAwesomeMenuItems = create new array, arguments=menu choices1, 2, 3, etc.
Code:
return $BeAwesomeMenuItems
At this point, your Cmd.BeAwesome script (notice the difference in names and how they're mapped above), will launch, using the data that was returned from the Preload script as its arguments effectively "skipping" the user argument input stage in the CMD script.
Just another way to keep things clean and tidy, and to seperate the Data from the Logic, like most good programmers should.
When I wrote that, I hadn't yet ran into this problem:
When a selection in your menu is supposed to be either TRUE or FALSE, and the result happens to be FALSE, the command recieving the argument array thinks you didn't supply anything and asks you the question again, thus defeating the purpose of the menu in the first place.
Has anyone else ran into this? Know something I've done wrong?
-
- Posts: 2033
- Joined: Wed, 29. Jun 05, 01:45
A preload command, only fires the actual command when it returns 'something'. i.e. not null, not 0, and not false.
Setup your scripts to accept arguments like 1/2, instead of true/false if you want the command to be run, and you want to use some indicator argument (or an array of size 1 with a boolean in it, or some other non true/false solution)
Setup your scripts to accept arguments like 1/2, instead of true/false if you want the command to be run, and you want to use some indicator argument (or an array of size 1 with a boolean in it, or some other non true/false solution)
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
-
- Posts: 2033
- Joined: Wed, 29. Jun 05, 01:45
Q: What actually happens to missiles in OOS?
As from as far back as I remember, I just know that ships don't use missiles OOS. But I'm trying to build a combat script atm, and I'm noticing that the scripts have sections to catch incoming missiles, whilst OOS.
So is it that missiles still exist OOS but can only be fired IS?
Can missiles exist OOS but just aren't fired?
Or...?
As from as far back as I remember, I just know that ships don't use missiles OOS. But I'm trying to build a combat script atm, and I'm noticing that the scripts have sections to catch incoming missiles, whilst OOS.
So is it that missiles still exist OOS but can only be fired IS?
Can missiles exist OOS but just aren't fired?
Or...?
-
- Posts: 22477
- Joined: Sat, 23. Apr 05, 21:42
-
- Posts: 2033
- Joined: Wed, 29. Jun 05, 01:45

Then how do missiles work in OOS? (damage wise and script reference wise)
And in what way do you mean they can not be targeted?
As the plugin.acp.fight.object uses
Code: Select all
$incmissle = [THIS]->find nearest missile aiming to me
...
if [THIS]->is in active sector
...
else
$rnd.missile.att = random value from 5 to 15 - 1
if $rnd.missile.att
= [THIS]->fire lasers on target $incmissle using turret 0
end
$ret = $incmissile -> exists
$ret <- [FALSE]
But, they are still referable ($incmissile), in scripts like the above -get nearest missile aiming at me- and -get array of missiles aiming at me-
(Or could it be something more zany, e.g. missiles only exists as ware subtype references on their targeted ships, incoming missile array)
Q2: Also, how do missiles work in OOS combat, as I know that ships "refresh" less often in OOS, and the missile travel distance would be covered in very few 'ticks'
Q3: Which actual command, makes ships do damage in OOS combat?
Context: I want to make capitol ships in combat, follow a specific way point of movement for IS combat whilst its turrets do the fighting. But if I did that on OOS, they will not shoot each other (as turret scripts sleep whilst OOS).
So which script command would I need to run on the task 0, to make them fight OOS, (hopefully, whilst still sort of following their way points)
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
Like jlehtone said, missile objects do not exist OOS, therefore you can not intercept them.
When fired, they hit instanteous at any range.
However, missiles do not automatically hit. I don't know the responsible variables but a missile fired OOS hits... sometimes.
It's black magic just like the OOS laser fire results.
When fired, they hit instanteous at any range.
However, missiles do not automatically hit. I don't know the responsible variables but a missile fired OOS hits... sometimes.
It's black magic just like the OOS laser fire results.
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.