[Discussion] Generic X3TC S&M questions III

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Firewrath
Posts: 121
Joined: Fri, 3. Aug 07, 05:49
x3tc

Post by Firewrath » Wed, 26. Oct 11, 01:16

Yeah, this was a problem i was going to run into with kill tracking,
i honestly figure id steal this bit of code from 'plugin.autotrade.local'

Code: Select all

032   * load experience value
033   $experience = [THIS] -> get local variable: name='experience'
034   if not $experience
035   |$experience = 1
036   |[THIS] -> set local variable: name='experience' value=$experience
037   end
except replace [THIS] with $killer (since i want it to run on my ship, ..least i think that would work, :P) and '$experience' with '$LPisalive'.
so the first time it runs itd check if that localvar existed and was 1, if it was itd skip the rest of the script, if not, itd set it, and add a kill to my ships score,
(LP = Leveling Pilots, just to keep my localvar separate incase someone else sets the same one,)


Gazz wrote: Suggest a starting skill of (Player Fight Skill / 2).

It's kinda annoying to deal with complete rookies in an "advanced" game.
There's a limit to the amount of micromanagement that still is "fun".
the player doesnt have a fight skill that i can see*, theres 'fight rank' but i think that maxes out at 1 million points, ...and fight skill maxes out at 27 (in usefulness anyways),
(* though it might since you can tell your own ship to auto-pilot attack, ...i'll have to look into that some time)
from '!plugin.acp.fight.skill.std':

Code: Select all

042   else if $Fightskill < 26
<Script stuff>
049   else
<Script stuff>
056   end
so by the time you reached your 3rd level in fight rank, youd max the fight skill of all your ships,
its an interesting idea and if i get mine done/working, i could do something like it,
(since you reach the max fight rank at like 333,333, itd prolly be 'fight rank /12345' (333,333 / 27 = 12345.6etc ))

but what im thinking of is a Lot less micromanaging then CODEA, im just setting the fight skill to 1 when you buy/capture a new ship and letting the ships level up with combat as normal, which is a bit more real like, youre hiring a new pilot for your new ship,
(...id like to add in more experienced pilots for hire VIA Marines, but that would be a bit down the road if i can figure out how to do it at all,)

CODEA does something like that but you have to setup fight wings and squads and they can only fly small ships at first, (if i remember correctly)

...sorry if this post rambles a bit, i like Just woke up, -_-

Firewrath
Posts: 121
Joined: Fri, 3. Aug 07, 05:49
x3tc

Post by Firewrath » Thu, 27. Oct 11, 22:24

...probably shouldnt post twice in a row, but i found some info i thought id add in here, (And then i ran into a problem >.<)

first, player owned ships do get a fight skill, its random between 1-26 (though prolly higher, but 26-27 was the highest i saw in my testing),
and second the Player ship that youre flying, has a fight skill of 0,

i was going to try and see if that went up, but it seems if i go through a gate, my game crashes while playing a random station announcement, O_o
i go through a gate, it goes to a black screen, plays the random announcement and thats it, doesnt do anything else, O_o
any other ships i own can go through just fine,
i figure it has something to do with SIGNAL_CHANGESECTOR triggering, but it doesnt do it with that little popup message i was using before (though changing sectors does seem to take a little longer,...)


So. Since i found that out while posting this, -_-
mebey someone can help me with that, cause its not making any sense to me,

im using these scripts:
al.plugin.test.xml

Code: Select all

001   global secondary signal map: add signal=SIGNAL_CHANGESECTOR race=Player class=Ship script='test.menu' prio=120 name='Test'
002   return null
test.menu.xml:

Code: Select all

001   $array = = get ship array: of race Player class/type=null
002   $array = = create custom menu array: heading='Your ships'
003   $size = size of array $array
004   while $size 
005   |dec $size =
006   |$ship = $array[$size]
007   |$ida = $ship -> get ID code
008   |$idb = $ship -> get pilot name
009   |$idc = $ship -> get pilot fightskill
010   |$text = = sprintf: fmt='%s (%s) (%s) (%s)', $ship, $ida, $idb, $idc, null
011   
012   |add custom menu item to array $menu: text=$text returnvalue=$ship
013 @ | = wait 1 ms
014   end
015   $ret = open custom menu: title='Pilots' description=null option array=$menu
016   skip if not $ret == -1 
017   |return null
018   $ret -> destruct: show no explosion=[FALSE]
019   return null
(Yes. i know the 2nd script detroys your ship if you select it from the menu, i'll remove that later, i was looking for a way to show all the player owned ships at once and found this script in ScRaT_GER's tutorial on menus and it was almost Exactly what i was looking for ...id rather make it look more like the properties menu that shows all your ships/stations/etc, but i think i have bigger problems right now, :P)


EDIT: and no, im not stupid enough to have a menu popup every time someone undocks or goes through a gate, :P
(Thats just for testing)
i worried there might be a bigger problem with attaching SIGNAL_CHANGESECTOR to player owned ships when the player flys them,

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

Post by EmperorJon » Sun, 30. Oct 11, 14:13

Hi everyone, having trouble with some Start.xml stuff. Been conversing on DevChat so some of you will know the score...


The Problems:
1. Equipment etc. is being spawned, suggesting Start.xml isn't running properly. This is reported by some people, however...
2. The script calls in Start.xml aren't working either, and when commented out aren't helping, so they're no what's causing the problem, and...
3. 2 of the scripts keep vanishing even though they're in the files. When I open the SE and create a new script with the same name, it tells me it already exists and magically reappears. Quitting either the game or the... game, then resets them back to hidden status o_O...
4. It all worked fine until I added a bit more to the files.

Note, these are altered XTC files, for a mod for a mod I'm making.

gamestarts.xml

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<gamestarts>
  <!-- Bitmask
     1 = 
     2 = Terran plot completed
     4 = Fight Rank 3,333 reached
     8 = Trade Rank 3,333 reached
    16 = Fight Rank 100,000 reached
    32 = Trade Rank 100,000 reached
    64 = Goner Plot Complete
   128 = Tormented Teladi Completed
   256 = HUB plot completed
   512 = Argon Rank 10,000
  1024 = Boron Rank 10,000
  2048 = Split Rank 10,000
  4096 = Paranid Rank 10,000
  8192 = Teladi Rank 10,000
 16384 = Argon Rank 333
 32768 =
 65536 =
  -->

  <!-- Argon Emigrant -->
  <gamestart id="201" name="Argon Emigrant" description="Barely having been able to scrape together the money for your very first ship, you set out to make big money in the Expansion Region." difficulty="Normal" image="Argon" plot="0">
    <player name="Ian Braben" species="Argon" gender="Male" age="22"/>
    <!-- Pandora's Gate -->
    <sector x="13" y="12"/>
    <ship typename="SS_SH_A_M4P"/>
  </gamestart>

  <!-- Beyond the Frontier -->
  <!--
  <gamestart id="211" name="Beyond the Frontier" description="What does this button do ? One jump later you almost collide with a capital Teladi ship." difficulty="normal" image="Terran" plot="0">
    <player name="Jzora Leats" species="Terran" gender="Female" age="31"/>
     Pandora's Gate 
    <sector x="13" y="12"/>
    <ship typename="SS_SH_X_SHUTTLE"/>
  </gamestart> -->

  <!-- Loyal Lar -->
  <gamestart id="604" name="Loyal Lar" description="Being a royal servant is not always easy. Your Queen sends you to find a suitable sector for her new residence." difficulty="Easy" image="Boron" plot="0">
    <player name="Maha Ma" species="Boron" gender="Male" age="15"/>
    <!-- Nahos Nihal -->
    <sector x="11" y="9"/>
    <ship typename="SS_SH_B_TPP"/>
  </gamestart>

  <!-- The Quest -->
  <gamestart id="601" name="The Quest" description="Your bloodline has done great things in the past and made the Paranid look good, even in the eyes of the barbarians. It is time for such greatness again." difficulty="Easy" image="Paranid" plot="0">
    <player name="Loomanckstrat" species="Paranid" gender="Male" age="35"/>
    <!-- Holy Pathway -->
    <sector x="15" y="12"/>
    <ship typename="SS_SH_P_M5_3"/>
  </gamestart>  

  <!-- A new battleground -->
  <gamestart id="602" name="A new battleground" description="After completing your education in the millitary college of family Tkr you leave the known universe. You'll come to fame on the new battlegrounds." difficulty="Hard" image="Split" plot="0">
    <player name="Shoo t'Drrg" species="Split" gender="Male" age="21"/>
    <!-- Rhonkar's Dominion -->
    <sector x="14" y="8"/>
    <ship typename="SS_SH_S_M5_3"/>
  </gamestart>

  <!-- Nividium Horizon -->
  <gamestart id="603" name="Nividium Horizon" description="The future wasn't as bright as you hoped for and your last deal did not go as well as you would have liked. So you grab your remaining ship and set sail towards the new universe. It couldn't be worse there, could it?" difficulty="Easy" image="Teladi" plot="0">
    <player name="Sinassis" species="Teladi" gender="Female" age="30"/>
    <!-- Atropos II -->
    <sector x="16" y="10"/>
    <ship typename="SS_SH_T_M4P_3"/>
  </gamestart>  
  
  <!-- A new career -->
  <gamestart id="605" name="A new career" description="As a well respected military man with good relations and connections in both military and civilian circles, you're 'Uniquely Qualified' for a job of utmost importance." difficulty="Easy" image="Terran" plot="0">
    <player name="Col. Samuel Jackson" species="Terran" gender="Male" age="37"/>
    <!-- Pandora's Gate -->
    <sector x="13" y="12"/>
    <ship typename="SS_SH_TR_M5"/>
  </gamestart>
   
  <!-- Royal Opera -->
  <!--
  <gamestart id="221" name="Royal Opera" description="You lost your military rank, your career and your wealth. So you have decided to reclaim everything in the expansion region." difficulty="easy" image="Boron" plot="0">
    <player name="Nullu Ni" species="Boron" gender="Male" age="24"/>
     Pandora's Gate 
    <sector x="13" y="12"/>
    <ship typename="SS_SH_B_M6"/>
  </gamestart> -->

  <!-- Inquisition Symphony -->
  <!--
  <gamestart id="241" name="Inquisition Symphony" description="The unholy Kha'ak are desacrating your sector, show them the light !" difficulty="hard" image="Paranid" plot="0">
    <player name="TODO: Paranid Name" species="Paranid" gender="Male" age="52"/>
     Pandora's Gate 
    <sector x="13" y="12"/>
    <ship typename="SS_SH_P_DC"/>
  </gamestart> -->

  <!-- Battle Hymn -->
  <!--
  <gamestart id="251" name="Battle Hymn" description="Xenons assault your sector, fight with honor or die in shame." difficulty="hard" image="Split" plot="0">
    <player name="TODO: Split Name" species="Split" gender="Female" age="31"/>
     Pandora's Gate
    <sector x="13" y="12"/>
    <ship typename="SS_SH_S_M7"/>
  </gamestart> -->

  <!-- Profit Blues -->
  <!--
  <gamestart id="231" name="Profit Blues" description="The opportunity for profit lured you into the expansion region. You can already smell the credits." difficulty="easy" image="Teladi" plot="0">
    <player name="TODO: Teladi Name" species="Teladi" gender="Female" age="29"/>
     Pandora's Gate 
    <sector x="13" y="12"/>
    <ship typename="SS_SH_T_TSP"/>
  </gamestart>   -->

  <!-- Space Shanty -->
  <!--
  <gamestart id="261" name="Space Shanty" description="Time to loot and plunder the expansion area." difficulty="hard" image="Pirates" plot="0">
    <player name="Mohandai Ke'Sahndhran" species="Human" gender="Male" age="44"/>
    Pandora's Gate 
    <sector x="13" y="12"/>
    <ship typename="SS_SH_PI_M7_P"/>
  </gamestart> -->

  <!-- Hive Music -->
  <!--
  <gamestart id="271" name="Hive Music" description="After an unlucky jump you are almost alone in enemy territory." difficulty="x-treme" image="Khaak" plot="0">
    <player name="Kzkkns r'kst" species="Kha'ak" gender="unspecified" age="3"/>
     Pandora's Gate 
    <sector x="13" y="12"/>
    <ship typename="SS_SH_K_M4P"/>
  </gamestart> -->

  <!-- Digital Serenade -->
  <!--
  <gamestart id="281" name="Digital Serenade" description="Search and Destroy" difficulty="x-treme" image="Xenon" plot="0">
    <player name="Intel" species="Xenon" gender="unspecified" age="0"/>
    Pandora's Gate
    <sector x="13" y="12" />
    <ship typename="SS_SH_X_M4P"/>
  </gamestart>-->

  <!-- Quickstart -->
  <!--
  <gamestart id="1000" name="Quickstart" description="Quickstart for the XTC Team with a good ship, some money into a fully expanded universe." difficulty="normal" image="start07" plot="0">
    <player name="Thereshallbewings" species="COMMENT OUT" gender="BEFORE RELEASE" age="101"/>
    Pandora's Gate
    <sector x="13" y="12"/>
    <ship typename="SS_SH_OTAS_M6M"/>
  </gamestart>-->



  <!-- **EJ's Mod Gamestarts** -->
  <!-- Misc starts -->

  <!-- Sneaky Smuggler -->
  <gamestart id="700" name="Sneaky Smuggler" description="For the past few wozuras you've successfully smuggled 'luxury commodities' between the new and old sectors. If the Terrans knew you were using their gate..." difficulty="X-Treme" image="Teladi" plot="0">
    <player name="Rianus Imathios Halidos VII" species="Teladi" gender="Female" age="21"/>
    <!-- Pandora's Gate -->
    <sector x="13" y="12"/>
    <ship typename="SS_SH_T_TS"/>
  </gamestart>

  <!-- Humble Merchant-->
  <gamestart id="701" name="Humble Merchant" description="Herron's Nebula wasn't as profitable as you hoped, and now you turn to the new world..." difficulty="Not all that hard" image="Argon" plot="0">
    <player name="Hari Gul" species="Argon" gender="Male" age="24"/>
    <!-- Sirius II -->
    <sector x="10" y="10"/>
    <ship typename="SS_SH_A_TS"/>
  </gamestart>

  <!-- Yaki General-->
  <gamestart id="702" name="Yaki General" description="Peaceful!? You didn't get where you were today through peace. You are the shadows, you have claimed many lives. Now time to claim a few more." difficulty="Hard" image="Boron" plot="0">
    <player name="General Hilo 'Shadows' Bo" species="Boron Yaki" gender="Male" age="22"/>
    <!-- Tortuga -->
    <sector x="14" y="9"/>
    <ship typename="SS_SH_Y_M3P"/>
  </gamestart>

  <!-- Neutral Argon-->
  <gamestart id="703" name="Neutral Argon" description="Unknown to the universe, a star begins to rise. You need not worry about enemies at this stage, nobody's ever heard of you." difficulty="Hard" image="Argon" plot="0">
    <player name="Neil Flot" species="Argon" gender="Male" age="24"/>
    <!-- Pandora's Gate -->
    <sector x="13" y="12"/>
    <ship typename="SS_SH_A_M5"/>
  </gamestart>

  <!-- Serious Split-->
  <gamestart id="704" name="Serious Split" description="The expansion region is ripe with economic opportunities... Split say, get trading!" difficulty="Average/Easy" image="Split" plot="0">
    <player name="Wan t'Cash" species="Split" gender="Female" age="19"/>
    <!-- Chin's Demise -->
    <sector x="15" y="7"/>
    <ship typename="SS_SH_S_TS"/>
  </gamestart>

  <!-- Solaran Soldier-->
  <gamestart id="705" name="Solaran Soldier" description="All your life there has only been Solara. Then the Terran's came back... now you find your space filled with disgusting alien races!" difficulty="Hard" image="" plot="0">
    <player name="Lt. James Mann" species="Aldran" gender="Male" age="35"/>
    <!-- Aldrin -->
    <sector x="13" y="10"/>
    <ship typename="SS_SH_AL_M3P"/>
  </gamestart>

  <!-- Trapped Priest-->
  <gamestart id="706" name="Trapped Priest" description="Unholy pirates tried to steal these holy relics! You fought bravely, but your ship is highly damaged. If you survive, His Holiness will surely reward you greatly!" difficulty="Hard" image="Paranid" plot="0">
    <player name="Ulmonkcketlacck" species="Paranid" gender="Male" age="32"/>
    <!-- Twin Paradox -->
    <sector x="13" y="15"/>
    <ship typename="SS_SH_P_TSP"/>
  </gamestart>

  <!-- Boron Constable-->
  <gamestart id="707" name="Boron Constable" description="As a member of the Boron police, it's your duty to uphold all that is lawful and good in the new regions of space." difficulty="Average" image="Boron" plot="0">
    <player name="Ulmonkcketlacck" species="Paranid" gender="Male" age="32"/>
    <!-- Waves of Ammonia -->
    <sector x="10" y="9"/>
    <ship typename="SS_SH_B_M4"/>
  </gamestart>

  <!-- Silly starts -->

  <!-- Bleep!-->
  <gamestart id="708" name="Bleep!" description="The Xenon's greatest fear was that a union of races would begin to fight back. These sectors are overrun with fresh new life, and the Xenon have made a strategical retreat for now. You've been left behind in busy space! Oh *BLEEP*!
" difficulty="Actually Impossible" image="Xenon" plot="0">
    <player name="Sector13/41_M3_Wing6" species="Xenon Fighter Craft AGI" gender="N/A" age="Version 4261.3.1"/>
    <!-- Sirius II -->
    <sector x="10" y="10"/>
    <ship typename="SS_SH_X_M4P"/>
  </gamestart>

  <!-- Shivan-->
  <gamestart id="709" name="Shivan Dragoness" description="As a great aged Shivan Dragoness you must lead your pack to new hunting grounds!" difficulty="Actually Impossible" image="" plot="0">
    <player name="Aeuaol't" species="Shivan Dragon" gender="Female" age="54"/>
    <!-- Pandora's Gate -->
    <sector x="10" y="10"/>
    <ship typename="SG_SH_M4"/>
  </gamestart>

  <!-- Bzzzt!-->
  <gamestart id="710" name="Bzzzt!" description="Bzzzt! Zttt zttt zttt! Bzzzzzzzzzzzzztztzt!" difficulty="Actually Impossible" image="" plot="0">
    <player name="?" species="Kha'ak Drone" gender="?" age="?"/>
    <!-- Waves of Ammonia -->
    <sector x="10" y="9"/>
    <ship typename="SS_SH_K_M4P"/>
  </gamestart>
  
</gamestarts>

______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______

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

Post by EmperorJon » Sun, 30. Oct 11, 14:15

Edit: It won't let me post starts.xml. I think it's too big. :S


Edit 2: Found the offending code!

Whenever this isn't commented, it fails to start properly. (Still not pinned the mysterious script hiding stuff. Probably just Win7 problems)

Code: Select all

          <!-- Bzzzt! 710 -->

          <!--<do_when value="{player.gamestart}" exact="710" comment="bzzzt!">
            <reward_player>
              <money exact="0"/>
              <notoriety>
                <relation race="argon" operation="set" exact="min" mutual="1"/>
                <relation race="boron" operation="set" exact="min" mutual="1"/>
                <relation race="paranid" operation="set" exact="min" mutual="1"/>
                <relation race="split" operation="set" exact="min" mutual="1"/>
                <relation race="teladi" operation="set" exact="min" mutual="1"/>
                <relation race="goner" operation="set" exact="min" mutual="1"/>
                <relation race="pirate" operation="set" exact="min" mutual="1"/>
                <relation race="khaak" operation="set" exact="neutral"/>
                <relation race="xenon" operation="set" exact="min" mutual="1"/
                <relation race="atf" operation="set" exact="min" mutual="1"/>
                <relation race="terran" operation="set" exact="min" mutual="1"/>
                <relation race="yaki" operation="set" exact="min" mutual="1"/>
              </notoriety>
              <equipment>
              </equipment>
            </reward_player>
            <run_script script="EJ.XTC.StartMod.Bzzzt">
              <scriptargs>
                <scriptvalue datatype="integer" datavalue="710"/>
              </scriptargs>
            </run_script>
          </do_when>-->
Anything notably wrong with it? Higher than allowed start ID, too many races set to minimum relations, etc? ;). I'm probably just missing a close tag somewhere.
______
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 » Tue, 1. Nov 11, 14:20

This,

Code: Select all

>
missing off the end of,

Code: Select all

<relation race="xenon" operation="set" exact="min" mutual="1"/ 
perhaps ????

-----------------------------------------------------------------

and one thing i noticed,

Code: Select all

  <!-- Boron Constable--> 
  <gamestart id="707" name="Boron Constable" description="As a member of the Boron police, it's your duty to uphold all that is lawful and good in the new regions of space." difficulty="Average" image="Boron" plot="0"> 
    <player name="Ulmonkcketlacck" species="Paranid" gender="Male" age="32"/> 
    <!-- Waves of Ammonia --> 
    <sector x="10" y="9"/> 
    <ship typename="SS_SH_B_M4"/> 
  </gamestart>
Why is a Boron cop a Paranid male aged 32? and if you tried to say his name underwater you would drown!

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

Post by s9ilent » Wed, 2. Nov 11, 10:16

I have a... bizzare question

I'm writing a webservice so for some X related mods that I wanted to work on. Ideally I would like to do something akin to a shared login (i.e. User names on my service, need to match existing egosoft forum users)

Is there any way to validate users (and send them a pm) with out using the web page? (As passing compressed html is.. messy and not that efficient)
Right now I'm just using a URL like:
http://forum.egosoft.com/profile.php?mo ... &u=s9ilent

Also, is there a way to request to get an increased PM allowance?

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

Post by EmperorJon » Wed, 2. Nov 11, 20:21

@Mark That's exactly the sort of issue I was looking for! So obvious! Thanks! :D

Also, he's a 32 year old Paranid because it's copied from the Paranid start, and this was before I made the actual pilot changes, don't worry... XD
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______

Murphius
Posts: 2
Joined: Mon, 7. Nov 11, 16:42

Post by Murphius » Mon, 7. Nov 11, 16:45

I was trying to create my own sectors, but couldn't find anything in the scripts, or forums, can anyone point me in the right direction?

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24965
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Mon, 7. Nov 11, 18:02

There is a built-in tool called galaxy editor that can be used for creating own maps and sectors. The Tutorials and Resources sticky contains information on how to activate and open it. Best you also look for Tutorials in that sticky (and in the one in the X3:R S&M forum).
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

Murphius
Posts: 2
Joined: Mon, 7. Nov 11, 16:42

Post by Murphius » Tue, 8. Nov 11, 00:20

Using the editor or scripts is there a way to create an additional sector within an existing game?

Hypochondriac
Posts: 85
Joined: Wed, 16. Nov 11, 05:51
x3tc

Post by Hypochondriac » Wed, 23. Nov 11, 19:20

I tried search but didnt find anything. how do I change damage done by weapons? I want to make the repair laser more powerful.

Also from what I've read you can't run a script in a saved game?? So if I do manage to edit the repair laser I would need to start a new game to use the upgraded laser? ?

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24965
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Wed, 23. Nov 11, 19:37

Murphius wrote:Using the editor or scripts is there a way to create an additional sector within an existing game?
You can add a sector to the map using the ingame Galaxy Editor and load then the map with the loadmap-command of the Mission Director (see Ketraar's explanation here).
Hypochondriac wrote:how do I change damage done by weapons? I want to make the repair laser more powerful.
Laser damage can be changed in the TBullets file. The Tutorial How to make custom weapons by Geeky explains the necessary steps.
Hypochondriac wrote:Also from what I've read you can't run a script in a saved game?? So if I do manage to edit the repair laser I would need to start a new game to use the upgraded laser??
First of all, if you change the TBullets file you'll would have a mod, as you mod(ify) a file. Scripts can always be used without the need for a new start of the game. With mods it depends on what they change. A mod changing laser values works also in the current game.

Edit: typo.
Last edited by X2-Illuminatus on Wed, 23. Nov 11, 19:54, edited 2 times in total.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

Hypochondriac
Posts: 85
Joined: Wed, 16. Nov 11, 05:51
x3tc

Post by Hypochondriac » Wed, 23. Nov 11, 19:51

Thanks, time to go experiment.

Firewrath
Posts: 121
Joined: Fri, 3. Aug 07, 05:49
x3tc

Post by Firewrath » Thu, 1. Dec 11, 13:33

Ok, ill be the first to admit im completely new to scripting and dont understand alot of the complex stuff.
(Right now, Arrays and the GUI are like out to get me, >.<)
but this looks like it should Work. =/

So, can someone Please tell me Why this runs the 'test.message' script as Soon as i open the ship command screen?
(or rather, where i screwed up, -_-)
and i mean like open it At All, not selecting a command or anything:

setup.test.xml

Code: Select all

load text: id=7200
add ship custom command: id=20002
set script command upgrade: command=COMMAND_TEST_SPECIAL_COMMAND upgrade=Fight Command Software MK1 script='test.message'
global script map: set: key=COMMAND_TEST_SPECIAL_COMMAND, class=Ship 2004, race=Player, script='test.message', prio=0
return null
Also, the language file '7200-L044.xml':

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<language id="44">

<page id="2008" title="Script Cmd Names" descr="">
 <t id="520">COMMAND_TEST_SPECIAL_COMMAND</t>
</page>

<page id="2010" title="Script Cmd Names" descr="">
 <t id="520">Test Special Command</t>
</page>

<page id="2011" title="Script Cmd Shorts" descr="">
 <t id="520">Test</t>
 </page>
 
<page id="2022" title="Command Info" descr="">
 <t id="520">This is a Test.\n\n</t>
</page>

<page id="7200" title="random text">
<t id="20001">Text</t>
<t id="20002">Some text</t>
</page>

</language>

User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER » Thu, 1. Dec 11, 20:26

So, can someone Please tell me Why this runs the 'test.message' script as Soon as i open the ship command screen?
The problem is the "set script command upgrade" command.
Its "script" parameter takes the name of the script, which is run every time you open the ship console. You can use it to control whether the "real" script (the one you assigned in the "global script map" command later) is executed, by returning [TRUE] or [FALSE].

To fix this, simply use the version of "set script command upgrade" which doesn't take an additional "script" parameter.

Greetings,
ScRaT

acgabs
Posts: 38
Joined: Sat, 19. Nov 11, 15:01
x3tc

Post by acgabs » Sat, 3. Dec 11, 01:19

Is there a way to enable specific weapons for more ship types than ingame?

Specifically, I'd like to mount gauss cannons on more M2 classes, as I don't really like the Teladi look but would prefer ammunition-based weapons a lot to energy-based ones.

HotSake
Posts: 472
Joined: Sun, 3. Jan 10, 22:15
x3tc

Post by HotSake » Sat, 3. Dec 11, 02:33

acgabs wrote:Is there a way to enable specific weapons for more ship types than ingame?

Specifically, I'd like to mount gauss cannons on more M2 classes, as I don't really like the Teladi look but would prefer ammunition-based weapons a lot to energy-based ones.
There's a thread about it linked from the tutorials sticky.

acgabs
Posts: 38
Joined: Sat, 19. Nov 11, 15:01
x3tc

Post by acgabs » Sat, 3. Dec 11, 17:00

Hello!

This is a translation of my post in the german thread, so if you already read it there no need to do it here again.

I have the following things planned:

1. No shields on any ships, depending on ship class and size improved Hull Strength.

2. No energy weapons (some exceptions), ammunition-based ordnance as the most common weaponry.

3. Restricting anti-capital weaponry to broadsides on capital ships and front turrets on heavy M7+ ships

Aim of all those things are to get a more "oldschool battleship" feeling, especially in capital ship combat.

Basically I've already found out how to mod turrets, weapons, ships etc. There are still several questions maybe some experienced modders can answer though.

1. If no ships use shields anymore the entire shield-industry is propably going down the drain, right? Should the entire industry sector just be removed from the game, or does someone have a better idea?

2. When a ship receives hull damage sometimes weapons, shields or other freight gets destroyed. How would that be influenced by increased hull points or is there a way to directly influence it?

3. Could someone with experience in balancing give a few hints or help a bit concerning the balancing of hull points on ships?

4. Positioning of the broadsides.. I'm not sure how to best integrate that, especially concerning some of the stranger ship models.. (broad and flat Paranid ships for example).

5. Weapons. I'd like to increase weapon range and projectile speed of most anti-capital weapons and add ammunition requirements to them, changing them into projectile weapons.. any ideas on that concerning balance? (I was thinking of max range around 15-17 km with a weapon speed of maybe 2000-2500 m/s).

There are a lot more things to think about, but these are the most pressing ones, would be awesome if I could get some help.

Cheers,

gabs

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Sat, 3. Dec 11, 23:44

acgabs wrote:2. When a ship receives hull damage sometimes weapons, shields or other freight gets destroyed. How would that be influenced by increased hull points or is there a way to directly influence it?
It's going to get worse.
Your best hope is to outfit ships with more "built in" and thus indestructible equipment via WareLists.
WL can only supply 1 item each so you can't use it for weapons.

4. Positioning of the broadsides.. I'm not sure how to best integrate that, especially concerning some of the stranger ship models.. (broad and flat Paranid ships for example).
X3 fight scripts are not smart enough to intentionally use something like a broadside.
Your best bet is to arrange turrets in a wedge, drop the "front" turret, and let the left/right turrets converge on the front.
That lets them fire on a target on the initial kamikaze charge that X3 capital ships are so fond of.
Beyond that it's completely random.

5. Weapons. I'd like to increase weapon range and projectile speed of most anti-capital weapons and add ammunition requirements to them, changing them into projectile weapons.. any ideas on that concerning balance? (I was thinking of max range around 15-17 km with a weapon speed of maybe 2000-2500 m/s).
The script insctruction for is X in range of turret Y has a maximum range of 10km. It automatically fails beyond that.

You could, however, "simply" scale down the universe and all objects in it by 50%.
That would let you use the necessary script instruction at a "felt" 20 km range. =P
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.

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

Post by s9ilent » Thu, 15. Dec 11, 21:34

Is it possible to customise the Main Menu's so a battle takes place in the background? (e.g. with a custom galaxy map or scripts?)

In X3:AP with the ship flying past it "looks" like it's in game, but the 2x TC mods for the main menu just seem to use a single bod file.

Post Reply

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