EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
[Discussion] Generic X3TC S&M questions III
Post new topic Reply to topic Goto page Previous  1, 2, 3 ... , 58, 59, 60  Next
View previous topic :: View next topic
Author Message
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)

MEDALMEDALMEDAL

Joined: 02 Apr 2006
Posts: 20390 on topic

Thank you for registering your game
PostPosted: Tue, 31. May 16, 16:56    Post subject: Reply with quote Print

You can add the ship, but I don't think you can get the "ware turns into ship"-mechanism to work.


_________________
Besteht Interesse an einem Nopileos-Hörbuch?

Farnhams Legende und Nopileos als E-Books!

"People who think they know everything are a great annoyance to those of us who do." - Isaac Asimov

"If it's not impossible, there must be a way to do it." - Sir Nicholas Winton
Back to top
View user's profile Send private message Visit poster's website
tearing





Joined: 26 Oct 2015



PostPosted: Sat, 4. Jun 16, 09:37    Post subject: Reply with quote Print

the only thing i can do are just changing existing drone eh.
and how the game decide ai ship's loadout?

Back to top
View user's profile Send private message
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)

MEDALMEDALMEDAL

Joined: 02 Apr 2006
Posts: 20390 on topic

Thank you for registering your game
PostPosted: Sat, 4. Jun 16, 20:12    Post subject: Reply with quote Print

tearing wrote:
the only thing i can do are just changing existing drone eh.


Or you write a script, activated via a command slot or a hotkey, which creates a drone close to the playership and removes the respective "drone ware" from its cargo hold.

tearing wrote:
and how the game decide ai ship's loadout?


Depends on the situation: For job ships there's the weapons and equipment tab in the Job editor allowing you to set allowed/forbidden values and define to which percentage values the ships should be equipped. You can also create and specify a config script in the general tab, which you could use to equip a ship. The wares list id will specific, which wares a trading ship will trade.
In some cases the loadout is hardcoded, and works after certain formulas: pick the strongest shields and a certain amount of certain weapons, or the like.


_________________
Besteht Interesse an einem Nopileos-Hörbuch?

Farnhams Legende und Nopileos als E-Books!

"People who think they know everything are a great annoyance to those of us who do." - Isaac Asimov

"If it's not impossible, there must be a way to do it." - Sir Nicholas Winton
Back to top
View user's profile Send private message Visit poster's website
tearing





Joined: 26 Oct 2015



PostPosted: Wed, 8. Jun 16, 17:54    Post subject: Reply with quote Print

today i made a new weapon.
after a cup of coffe its work.

now the problem is, i cant see any AI ship using that weapon.
i cant find a way how to make AI ship carry that weapon on job file.

Back to top
View user's profile Send private message
Leonardo Myst



MEDALMEDALMEDAL

Joined: 08 Jul 2016
Posts: 20 on topic

Thank you for registering your game
PostPosted: Sat, 9. Jul 16, 01:40    Post subject: Reply with quote Print

I was looking at [RESOURCE/TUTORIAL] X3:TC Music Library + Changing the soundtrack as I'm planning to replace all the music files with ship/cockpit noises (engine hum, beeps, clicks, etc.) and I have a question.

I got X3TC&AP on Steam but haven't installed the game yet, as we're in the process of getting a new computer.
Will the above info on changing the music tracks work on a Steam installed version of the game?
Are the music tracks in the same format/directory setting?

And another question... is there a limit to length of each track?
I assume the tracks loop.
But I started with a 40 minute track of an engine hum and added beeps and computer noises.
Should I chop it down into smaller pieces?
Or can I leave it as is?

Back to top
View user's profile Send private message
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)

MEDALMEDALMEDAL

Joined: 02 Apr 2006
Posts: 20390 on topic

Thank you for registering your game
PostPosted: Sat, 9. Jul 16, 11:30    Post subject: Reply with quote Print

Yes to the first two questions. I'm not aware of a file length limit, but to be honest I never tried it out with something longer than the usual 3 to 5 minutes.

When modding the Steam version it is a good idea to create a second installation, which is independent from the Steam installation though. That way you won't run into any problems with Steam trying to update or replace any modified files with their originals. To create one, simply copy the whole X3 Terran Conflict Steam folder (which includes the X3AP "addon" directory) to a different place and download and extract the NoSteam.exe files to that location. The one for X3AP can be downloaded here, and while there is no specific one for X3TC, you can simply download the latest non-Steam patch and use the exe file from that one to start the game without Steam.


_________________
Besteht Interesse an einem Nopileos-Hörbuch?

Farnhams Legende und Nopileos als E-Books!

"People who think they know everything are a great annoyance to those of us who do." - Isaac Asimov

"If it's not impossible, there must be a way to do it." - Sir Nicholas Winton
Back to top
View user's profile Send private message Visit poster's website
Leonardo Myst



MEDALMEDALMEDAL

Joined: 08 Jul 2016
Posts: 20 on topic

Thank you for registering your game
PostPosted: Sat, 9. Jul 16, 19:45    Post subject: Reply with quote Print

Thanks, X2-Illuminatus!
I'll do just that.

Back to top
View user's profile Send private message
Avatar of darkness



MEDALMEDAL

Joined: 03 Aug 2004
Posts: 83 on topic
Location: Moscow
Thank you for registering your game
PostPosted: Fri, 7. Oct 16, 23:59    Post subject: Reply with quote Print

I ran into a problem with ",910 ,842" and find solution by darkangel666:

http://www.x2thethreat.com/x2/forum/viewtopic.php?t=380876

Edit t file content


<page id="117">
<t id="2000">{117,910} {117,911}</t>
<t id="2001">{117,910} {117,842}</t>
<t id="2002">{117,957} {117,125}</t>
<t id="2003">{117,957} {117,126}</t>
<t id="2005">{117,841} {117,845}</t>
</page>

<page id="118">
<t id="2000">{118,910} {118,911}</t>
<t id="2001">{118,910} {118,842}</t>
<t id="2002">{118,957} {118,125}</t>
<t id="2003">{118,957} {118,126}</t>
<t id="2005">{118,841} {118,845}</t>
</page>

<page id="119">
<t id="2000">{119,910} {119,911}</t>
<t id="2001">{119,910} {119,842}</t>
<t id="2002">{119,957} {119,125}</t>
<t id="2003">{119,957} {119,126}</t>
<t id="2005">{119,841} {119,845}</t>
</page>



But what files I must change?


_________________
A long time ago in a galaxy far, far away...
Back to top
View user's profile Send private message Send e-mail
RobCubed





Joined: 21 May 2009
Posts: 17 on topic

Thank you for registering your game
PostPosted: Tue, 6. Dec 16, 23:36    Post subject: Reply with quote Print

Question -

How do I save data in the player's save game file?

Example - if I have a script that loads a t file, picks a random entry from a page in it, and then uses it - I want that player's save game to NEVER use that entry again.

Are there any example scripts or guides on how to store data in the player's save game?

Edit: Are global variables saved in the player's save game?

Edit #2: They do. That works. Simple enough.

Edit #2: New question - is there any efficient way to randomly resort a large array?

Edit #2: I'll just try Fisher-Yates, if I only have to run it once on setup it shouldn't be bad at all

More editing, Fisher-Yates worked great. 2500 string list (pulling from a page, leaving room for up to 10k if you want to edit the page file) goes very quickly - no noticeable delay when initializing. Only run on setup obviously, and only once unless you reinit globals.

Code:

$Key.ShipNames = 'rc.ShipNames'
$ShipNames = get global variable: name=$Key.ShipNames
if not $ShipNames
    $ShipNames = read text: page id=8847, from 1 to 10000 to array, include empty=[FALSE]
    $ShipNames.currentIndex = size of array $ShipNames
    $randomizedShipArray = array alloc: size=$ShipNames.currentIndex
    while 0 != $ShipNames.currentIndex
        $randomIndex = random value between 0 and $ShipNames.currentIndex
        dec $ShipNames.currentIndex
        $temporaryShipValue = $ShipNames[$ShipNames.currentIndex]
        $temporaryRandomValue = $ShipNames[$randomIndex]
        $ShipNames[$randomIndex] = $temporaryShipValue
        $ShipNames[$ShipNames.currentIndex] = $temporaryRandomValue
    end
    set global variable: name=$Key.ShipNames value=$ShipNames
end


I know I'm answering my own questions but thought it might help if somebody else has the same one. I hate seeing posts online "Hey how do I do this Edit: Nevermind fixed it" with no solution posted.

Back to top
View user's profile Send private message
hqz





Joined: 10 Jul 2016
Posts: 19 on topic

Thank you for registering your game
modified
PostPosted: Sat, 25. Mar 17, 05:46    Post subject: Reply with quote Print

I'm trying to set the turret command for a ship through a script but I can't get it to work.

So far I thought this would work (but it doesn't):

Code:

$ship -> call script !turret.command.alpha : turret id=2


What am I doing wrong?



Last edited by hqz on Sat, 25. Mar 17, 17:10; edited 1 time in total
Back to top
View user's profile Send private message
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)

MEDALMEDALMEDAL

Joined: 02 Apr 2006
Posts: 20390 on topic

Thank you for registering your game
PostPosted: Sat, 25. Mar 17, 13:53    Post subject: Reply with quote Print

You need to start turret scripts on either of the tasks from 1 to 6, which are reserved for these specific commands and which represent the turrets 1 to 6.


_________________
Besteht Interesse an einem Nopileos-Hörbuch?

Farnhams Legende und Nopileos als E-Books!

"People who think they know everything are a great annoyance to those of us who do." - Isaac Asimov

"If it's not impossible, there must be a way to do it." - Sir Nicholas Winton
Back to top
View user's profile Send private message Visit poster's website
hqz





Joined: 10 Jul 2016
Posts: 19 on topic

Thank you for registering your game
PostPosted: Sat, 25. Mar 17, 17:12    Post subject: Reply with quote Print

X2-Illuminatus wrote:
You need to start turret scripts on either of the tasks from 1 to 6, which are reserved for these specific commands and which represent the turrets 1 to 6.


Thanks for the quick reply.

Sorry for being such a noob but I'm not sure I understand the answer. Do you mean that I am not using the right ID or is the target of the script the wrong entity?

Back to top
View user's profile Send private message
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)

MEDALMEDALMEDAL

Joined: 02 Apr 2006
Posts: 20390 on topic

Thank you for registering your game
PostPosted: Sat, 25. Mar 17, 18:16    Post subject: Reply with quote Print

If you have a look at the code of the script you are calling, you will see that the turret id argument is not passed on to the then following called script !plugin.gz.missile.def.mk3. (Which actually makes the argument quite useless. Not sure what the idea behind that was. I guess it's either a remnant from an old script or a planned feature of some sort, which was not implemented.) The script !plugin.gz.missile.def.mk3 gets the turret id by checking which task it is running on. So in order to run it on turret 2, you have to start it directly on task 2, which isn't possible with the command you are using. There are two "start script on task" commands in the General Commands -> Script Calls section for this.

To learn more about tasks and script calls I suggest having a look at the MSCI Handbook, which, while originally written for X2, is still relevant to the latest X3 games.


_________________
Besteht Interesse an einem Nopileos-Hörbuch?

Farnhams Legende und Nopileos als E-Books!

"People who think they know everything are a great annoyance to those of us who do." - Isaac Asimov

"If it's not impossible, there must be a way to do it." - Sir Nicholas Winton
Back to top
View user's profile Send private message Visit poster's website
hqz





Joined: 10 Jul 2016
Posts: 19 on topic

Thank you for registering your game
PostPosted: Sat, 25. Mar 17, 20:51    Post subject: Reply with quote Print

X2-Illuminatus wrote:
If you have a look at the code of the script you are calling, you will see that the turret id argument is not passed on to the then following called script !plugin.gz.missile.def.mk3. (Which actually makes the argument quite useless. Not sure what the idea behind that was. I guess it's either a remnant from an old script or a planned feature of some sort, which was not implemented.) The script !plugin.gz.missile.def.mk3 gets the turret id by checking which task it is running on. So in order to run it on turret 2, you have to start it directly on task 2, which isn't possible with the command you are using. There are two "start script on task" commands in the General Commands -> Script Calls section for this.

To learn more about tasks and script calls I suggest having a look at the MSCI Handbook, which, while originally written for X2, is still relevant to the latest X3 games.


This is perfect. I just managed to make it work with this info.

Thanks a lot for your help. This community is pretty cool. Smile

Back to top
View user's profile Send private message
Reaper507





Joined: 05 Aug 2014



PostPosted: Sun, 9. Jul 17, 23:25    Post subject: Reply with quote Print

Hello guys,

changing jobs.txt requires start a new game? What means field "Is Owner Sector"?

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page Previous  1, 2, 3 ... , 58, 59, 60  Next
 
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
Control Panel
Login Data
The time now is Sun, 19. Nov 17, 18:03

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.62000 seconds, sql queries = 29