Heya,
I have a few more questions, maybe you guys can help.
1.) Does anyone know exactly how "jobs" work and what they are supposed to do?
2.) Does anyone know where the values for the <select/> statement are coming from?
[Q] Jobs and Select
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 274
- Joined: Sun, 14. May 06, 11:21
The jobs are basically the tasks that are given to NPC ships that populate the universe (like "go mining there for that", or "patrol that sector").
The select statement is defined in libraries.xsd.
The main attributes are faction, tag and race. What the statement does is it randomly selects a suitable character based on the criteria to fly the ship/be the engineer etc. of that ship that is assigned that job.
The select statement is defined in libraries.xsd.
The main attributes are faction, tag and race. What the statement does is it randomly selects a suitable character based on the criteria to fly the ship/be the engineer etc. of that ship that is assigned that job.
-
- Posts: 75
- Joined: Tue, 26. Nov 13, 10:07
I know what <select> does, but where does it have it's list from? (It can do also create ships, e.g.
will give you a freighter ship that can carry container-cargo.)
Concerning jobs, if the player gives one of his ships the command to follow, will that be a job, then? What is the connection between the jobs and the ai scripts?
Code: Select all
<select size="class.ship_l" tags="[tag.container]"/>
Concerning jobs, if the player gives one of his ships the command to follow, will that be a job, then? What is the connection between the jobs and the ai scripts?
Streaming while writing mods: twitch.tv/fumblesneeze
-
- Posts: 274
- Joined: Sun, 14. May 06, 11:21
Well, I guess the list is a global one, i.e. for characters there is a CharacterDB somewhere, which contains lots of characters and names, and for ships all ships that exist in the game.
And no, player ships don't have jobs, only AI scripts. An AI script is something that is executed on an entity (e.g pilot, engineer etc). A job describes the entity that will execute the job and then starts the corresponding AI script on it.
For example:
will create the M sized liquid freighter piloted by a random canteran pilot and will start trading water via the 'trade.ship' AI script in the cluster defined by "cluster_d_sector18_macro".
And no, player ships don't have jobs, only AI scripts. An AI script is something that is executed on an entity (e.g pilot, engineer etc). A job describes the entity that will execute the job and then starts the corresponding AI script on it.
For example:
Code: Select all
<job id="can_chapter2_light_trader_water_medium_sector18" name="{20204,1601}">
<basket basket="water"/>
<task task="trade.ship">
<param name="range" string="cluster"/>
</task>
<quota sector="3" zone="1"/>
<location class="sector" macro="cluster_d_sector18_macro"/>
<ship>
<select faction="canteran" tags="liquid" size="ship_m"/>
<owner exact="canteran" overridenpc="true"/>
</ship>
</job>
-
- Posts: 1842
- Joined: Tue, 2. Nov 10, 02:20
-
- Posts: 75
- Joined: Tue, 26. Nov 13, 10:07
I'm still not sure what this is used for that couldn't be done with pure md?
Next question: Are these jobs spawning ships/npcs or are they filtering and when certain conditions are met, run a certain script?
As in the case of the job you posted earlier, is this job checking if there is middle sized ship of the canteran faction with water in storage, and then assigns it the trade script, or is it creating a ship that fits these conditions and then assigns it that ai?
Next question: Are these jobs spawning ships/npcs or are they filtering and when certain conditions are met, run a certain script?
As in the case of the job you posted earlier, is this job checking if there is middle sized ship of the canteran faction with water in storage, and then assigns it the trade script, or is it creating a ship that fits these conditions and then assigns it that ai?
Streaming while writing mods: twitch.tv/fumblesneeze