View unanswered posts | View active topics It is currently Sat Dec 20, 2014 11:39 pm



Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next
F50's Modding tutorial 
Author Message
Militia Captain
Militia Captain

Joined: Sat Mar 11, 2006 5:25 pm
Posts: 994
Post F50's Modding tutorial
Chapter 1: copy/pasting and basic value modification of ships stations, and weapons.

Part 1: Your first mod.

viewtopic.php?t=1129&start=0

This tutorial assumes that you have taken a look at the link above and have decompiled the source xml files. It may also help to have taken a look at the xelarus modsite, linked to below. It contains many mods to play and learn from.

http://xelerus.de/index.php?s=mods


The easiest way to mod is to simply steal someone else's code, and put it into your own xml file. The two main sources to steal from are the decompiled source xml files, and the mods on xelarus.

So, down to modding. To mod you will need a WYSIWYG editor like notepad. A word processor like Microsoft Word will mess up your mod. Create a file and rename it to "FOO.xml" where 'FOO' is a name of your choice. Before we can actually make a ship, we have to make mod declarations. Here is the most basic mod (it doesn't actually *do* anything, just compiles :wink:):

Code:
1. <?xml version="1.0" ?>
2.
3. <!DOCTYPE TranscendenceExtension
4. [
5. ]>
6.
7. <TranscendenceExtension UNID="0xD1110000" version="0.98d">
8.
9.</TranscendenceExtension>


Lines 1 and 3 state things that are generally useless to modding, except for the fact that if you don't have line one, you can't do anything else, and if you don't have line 3, you lose a *very* helpful convenience from lines 4 and 5. Lines 4 and 5 are an empty list that will explained soon.

The mod actually begins on line 7 with the declaration of the Transcendence Extension itself. Our greatest interest here is: "UNID='0xD1110000". This UNiquely IDentifies your mod. By convention, the first three (hex) digits after the 'D' (currently are 1's) represent the identity of the modder, and the rest represent the identity of the mod and entities within the mod. Before you release a mod to the community (at xelarus), you should post the three digits that you will be using as your identity at the link below. After that is posted, ALWAYS use those same three digits for the UNID of your mod. Remember that since these digits are in hexadecimal, you can use anything from 0-9 and A-F (inclusive).

viewtopic.php?t=959&start=0

This does exactly the same thing:

Code:
1. <?xml version="1.0" ?>
2.
3. <!DOCTYPE TranscendenceExtension
4. [<!ENTITY extUNID         "0xD1110000">
5. ]>
6.
7. <TranscendenceExtension UNID="&extUNID;" version="0.98d">
8.
9.</TranscendenceExtension>


What's the difference? Instead of putting the numbers into line 7, we declared an ENTITY, and then put the ENTITY in place of the UNID in line 7. Entities are always of the form:

<!ENTITY FOO "BAR">

where FOO is the name you want to use in place of the UNID and BAR is the UNID itself.

Now that is done, lets go ahead and create a ship. Put the declaration code above into the file you created. Then, look at CharonPirates.xml (its one of the source xml files) and copy the corsair-class Gunship into line 8 of your file.

Now you have lots of code in those lines. I have added comments to the code below to explain what each line does. Comments in xml code are set off by <!-- and are closed by -->

Code:
<?xml version="1.0" ?>

<!DOCTYPE TranscendenceExtension
[
]>

<TranscendenceExtension UNID="0xD1110000" version="0.98d"> <!--Remember to change the 1's to something meaningful!-->

   <!-- Corsair-class Gunship -->
   
   <!--This tag states the defining features of the ship class. -->

   <ShipClass UNID="&scCorsair;"
         manufacturer=      "Charon Pirates"
         class=            "Corsair"
         type=            "gunship"
         score=            "25"
         techOrder=         "mech"
         
         mass=            "45"
         cargoSpace=         "5"
         thrust=            "250"
         maneuver=         "4"
         maxSpeed=         "25"

         leavesWreck=      "20"
         >       <!-- Note that I cannot put comments before the '>' character as that is technically within a tag-->

<!--
manufacturer: Useless, to my knowledge

class: Dictates the name of the ship type for when you are killed by this kind of ship or when you target a ship pf this type

type: Dictates the class of this ship for when you are killed by this kind of ship or when you target a ship pf this type
         
score: The amount of points you get for vanquishing a ship of this type
         
techOrder: Useless, to my knowledge

mass: How heavy the ship is. This effects how easy it is to move the ship with weapons fire, how fast the ship goes, and how well the ship maneuvers

cargoSpace: How much cargo the ship can hold. Generally only useful for playerships

thrust: How fast the ship accelerates

maneuver: How well the ship maneuvers. (Note: the lower the better)
         
maxSpeed: How fast the ship can go

leavesWreck: The percent chance of this ship leaving a wreak when it is destroyed.

Feel free to mess around with these values!
-->

      <Armor>
         <ArmorSection start="270" span="180" armorID="&itLightTitaniumPlate;" areaSet="0,2,3,7" />
         <ArmorSection start="90"  span="180" armorID="&itLightTitaniumPlate;" areaSet="1,4" />
      </Armor> 

<!-- The <Armor> tag defines the armor of the ship

armorID: The UNID of the type of armor of an armor section, in this case "&itLightTitaniumPLate;".

start: the start angle of the armor section in degrees.

span: the magnitude, in degrees, of the angle the section of armor covers.

-->

      <Devices>
         <Device deviceID="&itLaserCannon;"/>
      </Devices>

<!-- The Devices tag describes the devices installed on the ship.

Each devices is listed in the form: '<Device deviceID="FOO"/>' where FOO is the unid of the device. More on this tag in part 2

-->

      <Image imageID="&rsMediumShips1;" imageX="288" imageY="0" imageWidth="48" imageHeight="48" rotationOffset="-10" imageFrameCount="0" imageTicksPerFrame="0"/> <!-- This is various image information that I don't understand-->

      <AISettings
         fireRateAdj=      "40"
         fireAccuracy=      "75"
         perception=         "4"
         />

<!--This determines some AI behavior.

fireRateAdj: how fast the ship fires in relation to the fireing rate of the weapons installed. fireRateAdj=      "10" will cause the AI to fire at the firing rate of the weapon. fireRateAdj=      "1" will cause the AI to fire at an insane rate (much greater than that of the weapons it wields).

fireAccuracy: How close the AI has to be to hitting to fire.

perception: Determines how close you need to be before the ship notices you. I am unsure of the relationship between Transcendence's unit if distance, lightseconds (abbreviated ls), and the perception value.
-->

      <DriveImages>
         <NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
         <NozzlePos x="-30" y="-7"/>
         <NozzlePos x="-30" y="7"/>
      </DriveImages> <!--Drive image information that I don't understand-->

   </ShipClass>


Don't be afraid if you don't understand most of the comments, it will make sense later. :P

Unfortunately, this code does about as much as the simple 9 lines that we wrote previously. Its time to change that.

Try replacing the <Armor> tag with this:

Code:
      <Armor>
         <ArmorSection start="270" span="180" armorID="&itLightTitaniumPlate;" areaSet="0,2,3,7" nonCritical="general"/>
         <ArmorSection start="90"  span="180" armorID="&itLightTitaniumPlate;" areaSet="1,4" nonCritical="general"/>
         <ArmorSection start="270" span="180" armorID="&itLightTitaniumPlate;" areaSet="0,2,3,7" nonCritical="general"/>
         <ArmorSection start="90"  span="180" armorID="&itLightTitaniumPlate;" areaSet="1,4" nonCritical="general"/>
         <ArmorSection start="270" span="180" armorID="&itLightTitaniumPlate;" areaSet="0,2,3,7"/>
         <ArmorSection start="90"  span="180" armorID="&itLightTitaniumPlate;" areaSet="1,4"/>
      </Armor>


This adds four more lines. Every second line is the same except the first four lines have the option:

Quote:
nonCritical="general"


added before the end of each <ArmorSection /> tag. This option allows a segment of armor to be destroyed without destroying the ship. In this case, we used it to make the armor of the corsair about 3 times stronger.

This is good, but not much has happened yet. Try messing around with a few more values:

inside the ShipClass tag:

Quote:
type= "modship"
thrust= "650"
maneuver= "2"
maxSpeed= "45"
leavesWreck= "0"


When you are destroyed by this ship, instead of "Corsair-class gunship", it will be called "Corsair-class modship".

Now lets change the weapon it uses. If you go into stdWeapons.xml, you will find a weapon called &itMakayevLauncher; Replace the laser cannon with this weapon.

Code:
      <Devices>
         <Device deviceID="&itMakayevLauncher;"/>
      </Devices>


However, this weapon needs ammo. After the devices tag, add:

Code:
      <Items>
              <Item count="100d100" item="&itStrelkaWhite;"/>
           </Items>


Finally, in the <AISettings /> tag, change the AI settings:

Quote:
fireRateAdj= "10"
fireAccuracy= "95"



Go and be pwnd!


After you've had some fun with that, you will realize that the maneuverability of the Corsair modship has suffered. You can fix this by changing the cargoSpace option in the ShipClass tag from

Quote:
cargoSpace= "5"


to:

Quote:
cargoSpace= "50000"


Any other sufficiently large value will work (the value given is probably overkill).


Mess around with this until you feel comfortable or bored. Then copy another ship from the source, add it to your mod, and mess around with those values. You'll discover a few new options, feel free to ask on the forums what they do.


Part 2: Modding stations.

Modding stations is pretty much the same as modding ships. Go into CharonPirates.xml and copy the Charon Pirate Cache into your mod.

Here is some code with comments to explain.

Code:
   <StationType UNID="&stCharonPirateOutpost;"
         name=            "Charon Pirate Cache"
         sovereign=         "&svPirates;"
         abandonedScreen=   "&dsAbandonedStation;"
         dockScreen=         "&dsAbandonedStation;"
         dockingPorts=      "8"
         canAttack=         "true"

         armorID=         "&itLightTitaniumPlate;"
         maxHitPoints=      "50"
         hitPoints=         "50"
         fireRateAdj=      "80"   
         ejectaType=         "&vtWreckEjecta;"
         attributes=         "pirates,enemy,envAir,envEarth,envFire,envWater,populated"
         levelFrequency=      "cuv-- ----- ------ ----- -----"
         locationCriteria=   "-planet,-void"
         >

<!--
name: Dictates the name of the station type for when you are killed by or target this kind of station

abandonedScreen: Describes the dockscreen that is shown when the station is destroyed. Usually: "&dsAbandonedStation;"

dockScreen: Describes the dockscreen that is shown when the station is alive. If none, then it should be "&dsAbandonedStation;" by convention.

dockingPorts: Describes the number of docking ports.

canAttack: Generally = "true". I assume that if it is false then the station cannot attack.

armorID: Describes the resistances of the station by referring to the UNID of a certain armor type.

maxHitPoints: Describes the hit points of the station.

hitPoints: Describes the starting hit points of the station.

fireRateAdj: how fast the station fires in relation to the firing rate of the weapons installed. " fireRateAdj= "10" " will cause the AI to fire at the firing rate of the weapon. "fireRateAdj= "1" " will cause the AI to fire at an insane rate (much greater than that of the weapons it wields).

ejectaType: Describes the effect when you hit the station.

attributes: This is important if you wish to distinguish the item from others or wish it to be sold (or not to be sold) in certain stations. See Periculi's post later in the thread.

levelFrequency: Describes how often you will see this kind of station. The value is always of the form: "----- ----- ------ ----- -----" where each non-space character represents a level of system (Eridani being a level 1 system and St. K. being the first level 4 system). A dash means that station will not appear at that level, 'c' means very common, 'u' means uncommon, 'r' means rare, and 'v' means very rare.

locationCriteria: Describes where in a system a planet can be located.

-->

      <Image         imageID="&rsStations1;" imageX="0" imageY="512" imageWidth="156" imageHeight="156"/>

      <!--Same as with ships-->

      <Devices>
         <Device deviceID="&itLaserCannon;"   omnidirectional="true"/>
      </Devices>

<!--This tag, as I went over in part 1, describes the devices that this object can use. The only difference here is that stations cannot use any kind of shields. :(  However, I left out a very important detail illustrated in the above devices tag. Additional arguments can be added after the UNID such as omnidirectional="true" which change the way the weapon behaves. The most frequent are listed below:

omnidirectional: This may be true or false, default is false. When true this causes the weapon to act as if it were omnidirectional

secondaryWeapon: This may be true or false, default is false. When true this allows the weapon to be fired concurrently with the main weapon.

posAngle: This may be a number from 0 to 360 (potentially more, but anything above that is useless), I don't know what the default is. This determines the polar angle coordinate to the position of the weapon

posRadius: This may be a number from 0 to 360 (potentially more, but anything above that is useless), I don't know what the default is. This determines the polar radius coordinate to the position of the weapon

minFireArc: This may be an number from 0 to 360, I don't know the default value. This determines the minimum angle at which the device (probably just weapons, I don't think it would effect an ICX) can fire. Incompatible with Omnidirectional

minFireArc: This may be an number from 0 to 360, I don't know the default value. This determines the maximum angle at which the device can fire. Incompatible with Omnidirectional

-->

      <Ships>
         <Table>
            <Ship chance="85"   count="1d4"   class="&scCorsair;"      orders="guard"/>
            <Group chance="10">
               <Ship         count="1"   class="&scCorsair;"      orders="guard"/>
               <Ship         count="1"   class="&scViking;"      orders="guard"/>
            </Group>
            <Ship chance="5"   count="1d2"   class="&scViking;"      orders="guard"/>
         </Table>
      </Ships>

<!--More on the <Ships> tag later-->

      <Items>
         <Table>
            <Lookup chance="40" count="1" table="&trConsumables2;"/>
            <Lookup chance="40" count="1" table="&trMinorItem2;"/>
            <Lookup chance="20" count="1" table="&trMajorItem2;"/>
         </Table>
      </Items>

<!--This looks up some items. Chance describes the percent chance of that item, (in this case lookup item) or other entity actually being present. Remember that all tags with the same name share the same properties. If they are valid for both stations and ships they are no difference between placing them on stations or on ships. The <items> tag works the same here as it did for the strelka missiles.-->

      <Encounters frequency="common">
         <Table>
            <Ship chance="75" count="1d3"   class="&scCorsair;" orders="attack"   />
            <Ship chance="25" count="1"      class="&scViking;" orders="attack"   />
         </Table>
      </Encounters>

      <!--This creates bee-line attack ships at a frequency of "common" for every station of this type. If there are lots of stations, then expect LOTS of these encounters. Other values for frequency are "uncommon", "rare", and "very rare"-->

   </StationType>


While much of this is the same as modding for ships, there are two sets of tags that are completely new. They are the <Encounters> and <Ships> tags, and the <table> tag.

The <Encounters> and <Ships> tags both have very similar formats, if you copy the inside of one to the other, it will work without error. The format is:

Code:
<Ship count="dice/range/number"   class="UNID"   orders="string" sovereign="UNID">
   <Escorts>
      <Ship  count="dice/range/number"   class="UNID"   orders="escort"/>
   </Escorts>
</Ship>


count: The number or range of numbers of ships that appear. This can be described in one of three forms: dice, range, and (constant) number. Dice takes the form of "XdY" where X is the number of dice, and Y is the number of sides each die has. The computer simulates rolling the die to determine the number of ships randomly. Range takes the form of "X-Y" where X is the minimum number, and Y is the maximum number. Unlike dice, each possible number of ships from X to Y has the same chance of being picked. (Constant) number takes the form of "X" where X is the number of ships to be created.

class: The UNID (unique identifier) of the type of ship to be created. Remember the ship we modified? The UNID of a ship can be found in the first line of the ship definition. For example: <ShipClass UNID="&scCorsair;"

orders: This tells the AI what it should do. The most common values are "attack" which will send ships after the player, "patrol" which will send the ship circling around a point in space (usually the station), and "guard", which will cause the ship to sit still and wait for the player. Another interesting value is "wander" which will send the ship wandering around the system. If "patrol" is given as an order, you may add another option patrolDist="FOO" where foo is the range in lightseconds that the ship will circle at.

sovereign: The UNID of the sovereign that the ship belongs to. This should be OMITTED if this is inside a <ships> tag, but is NECESSARY if this is inside a <Encounters> tag. This is the major difference between the <encounters> and the <ships> tags.

Note that ships inside <Escorts> tags always have the orders "escort" which causes them to follow lead ship. If the count of the lead ship is greater than one, each ship will have its own escort. You may place as many ships inside an escort tag as you wish.

Notice that the escort tag is not necessary. If escorts are not used, a slightly different shorthand may be substituted:

Code:
<Ship count="dice/range/number"   class="UNID"   orders="string" sovereign="UNID" />



The <table> tag picks things out of a list. For example:

Code:
<Table>
   <Ship chance="75" count="1d3"   class="&scCorsair;" orders="attack"   />
   <Ship chance="25" count="1"      class="&scViking;" orders="attack"   />
</Table>


This code has a 75% chance of creating 1d3 Corsair-class gunships, and a 25% chance of creating 1 Viking-class gunship instead. In all the examples the values for chance add up to 100 within a table. I am not sure if this is necessary, but it is important to note.

This works identically with items.

There is one more feature of the <table> tag I need to mention.

Code:
<Table count="1d4">
   <!-- A list of stuff-->
</Table>


This code will pick 1d4 items from the table according to their chances. The "count" inside the table works exactly the same as the count for ships, so you can put a constant (count="4") or range (count="1-4") instead of "1d4" if you wish.


So there it is. Explore, experiment, and most of all, have fun!


Part 3: All sorts of cool weaponry.

First, a quick run-down of the format of a weapon:

Code:
   <!-- Turbolaser Cannon -->

   <ItemType UNID="&itTurbolaserCannon;"
         name=            "turbolaser cannon"
         level=            "3"
         value=            "1500"
         mass=            "1500"
         frequency=         "common"
         modifiers=         "EnergyWeapon; MajorItem"

         description=      "One of the most popular designs by the Earth Industries Conglomerate, the turbolaser cannon is a cheap, powerful, and reliable weapon."
         >

<!--
name: The name of the item.

level: The "level" of the weapon. Lower-level weapons are found in earlier systems and higher-level weapons are found in more advanced systems. The player will often use the level of the weapon to determine it's relative strength.

value: How much a station will buy/sell it for

mass: The weight of the weapon for purposes of calculating acceleration and turning speed.

frequency: How often a weapon is likely to appear as random loot. Some missions use this as criteria for accepting items (Dvalin).

modifiers: see Periculi's post below. MajorItem should be on all weapons and EngergyWeapon allows Longhzu spheres to be used on it.

description: displayed along with the weapon's name. Helps the player understand the purpose of the weapon and sometimes furnishes the weapon with backstory.
-->

      <Image imageID="&rsItems1;" imageX="96" imageY="0" imageWidth="96" imageHeight="96"/>

      <Weapon
            type=            "beam"

            damage=            "laser:2d4+1"
            fireRate=         "15"
            lifetime=         "30"
            powerUse=         "50"

            beamType=         "laser"
            primaryColor=      "0x5f, 0xf1, 0x2a"
            secondaryColor=      "0x00, 0xff, 0x00"
            sound=            "&snLaserCannon;"
            >

<!--
type: I have to ask Periculi

damage: Determines the damage of a weapon, more on this later.

fireRate: How fast the weapon fires. 1 is extremely fast, 100 is extremely slow.

lifetime: How long the weaponsfire lasts (in ticks, I believe). Helps to determine the range of the weapon

powerUse: the amount of power usage, in tenths of a MW, that the weapon uses when firing.


The rest are beam-specific and I'll need to ask Periculi about them.
-->
      </Weapon>

   </ItemType>



Making a simple weapon like this is easy, but don't worry, it gets harder.

About damage:

Damage is expressed in TYPE:NUMBER where type is the damage type of the weapon, and number can be a constant, range, or dice formula. Damage type can be any one of the list below. Betelguse made an attempt at giving "weights" to each damage type which is given in brackets after the damage type to help give you a rough idea of how good each damage type is.

laser (1)
kinetic (1)
particle (2.5)
blast (2.5)
ion (6.25)
thermo (6.25)
positron (15.63)
plasma (15.63)
antimatter (39.6)
nano* (39.6)
graviton* (97.66)
singularity* (97.66)
dark acid (244.14)
dark steel* (244.14)
dark lightning* (610.35)
dark fire* (610.35)

*not currently used to my knowledge in the vanilla (unmodded) game

Each armour, shield, and anything else that can be damaged has a "resistance value" to each damage type which is then multiplied by the damage number to produce the final damage result (certain exceptions apply, but they are outside of the scope of this tutorial).


THIS IS NO LONGER MAINTAINED, and is available under the WTFPL, reproduced below:

Code:
            DO WHAT THE @#$! YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is allowed as long
 as the name is changed.

            DO WHAT THE @#$! YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. You just DO WHAT THE @#$! YOU WANT TO.


I should also add that I would welcome someone modifying the information in this guide for the latest version, I haven't kept up on the latest advances in the xml (name it what you want).


Last edited by F50 on Sun May 29, 2011 1:35 am, edited 24 times in total.



Sat Mar 08, 2008 9:50 pm
Profile
Fleet Officer
Fleet Officer
User avatar

Joined: Sun Mar 05, 2006 6:31 am
Posts: 1920
Post 
small point
Code:
<!DOCTYPE TranscendenceExtension
[
]>

isn't needed at all. It can be removed at the code would work just as well.

_________________
Crying is not a proper retort!


Sat Mar 08, 2008 9:53 pm
Profile
Militia Captain
Militia Captain

Joined: Sat Mar 11, 2006 5:25 pm
Posts: 994
Post 
bump. Much added. Part 2 of chapter 1 is almost done (except for possibly numerous revisions).


Tue May 06, 2008 6:38 pm
Profile
Anarchist
Anarchist

Joined: Thu Feb 07, 2008 8:43 pm
Posts: 11
Post 
Good stuff here.

Thanks

_________________
a modder is as a modder does.


Sat Jul 19, 2008 1:30 am
Profile
Anarchist
Anarchist

Joined: Thu Feb 07, 2008 8:43 pm
Posts: 11
Post 
I copy the Charon Pirate cache into my extension edit it so it title is something else.

I set frequency to common for 4 systems and the problem I have is I haven't run in to any of them??

When I dock they should have a different name, I know this because I have extracted all the XML and editted the Charon Pirate Cache in the source code in the exact same way I editted in my extension and when I dock with the wreck it has the title I gave it.

My question is, why aren't my stations spawning from my extension?

I have been having a great time adding player ships from many movies and cartoons to the Transcendence game. But I really want to add some encounters from those same movies.

appreciate any and all feedback

Is building a module possible?

_________________
a modder is as a modder does.


Sat Jul 19, 2008 3:14 am
Profile
Fleet Officer
Fleet Officer

Joined: Sat Oct 13, 2007 7:48 pm
Posts: 1259
Location: By the beach
Post 
Yes, you can add a module. See below.


Stations:

I am assuming that if you edited the name you also created a valid UNID.

If you are expecting them in Starton Eridani, you would need to add them to the special table that the game uses for the Eridani star system. Eridani does not use the standard random placement draw.

If the stations aren't coming up in random systems there are a number of reasons.

One big one is: Does the station have the required placement attributes and location criteria that the system needs?

Since you copied the station, I will assume that you didn't alter the attributes or the location criteria.

Here are the attributes for a charon pirate outpost:

Code:
   attributes=  "pirates,enemy,envAir,envEarth,envFire,envWater,populated"


This shows that that type of station will appear in a wide range of systems. Air, Earth, Fire and Water are a form of environmental filter used to place stations and other objects. If your station retained those settings, then there should be no problems with it showing up due to attributes filtering it out.

In many systems, the 'enemy' and envType attributes will be the deciding factor, 'populated' seems to be in most labels for planets. However, when the list of enemies is prepared, your station is in a pool of stations- and the enemy stations can be a large pool.

If your attributes and location criteria aren't set right, the station won't appear. Other problems could be that you have a station with some kind of error that prevents it from being used. Check your code for errors. Check the debug file to see if any errors are recorded there and check to see if your mod extension was loaded.

Another problem could be simply that your number hasn't come up. Even though the station is 'common' it just might not have been drawn yet in a game.

Try testing the station to see if it will show up by a direct reference. You mentioned that you unpacked the tdb files with transdata so you can handle this:
In the transcendence.xml, you can find the eridani system definition and add your station reference in a table (to make it randomly appear in eridani) or put the station into a tag to make it show up every time. Look for the Sisters of Domina station reference, and copy the format there.

To make a module for the game in similar fashion to the ones that were unpacked into the TranscendenceSource file, you can look at the modules in the folder to see the format they require- the head and closing tags are important to identify it. To activate the module, you must go to the bottom of the transcedence.xml file and find the module filenames list. Add the name of your xml module there, and the game will load it.


Last edited by Periculi on Sat Jul 19, 2008 4:16 am, edited 1 time in total.



Sat Jul 19, 2008 3:53 am
Profile
Anarchist
Anarchist

Joined: Thu Feb 07, 2008 8:43 pm
Posts: 11
Post 
Thank you for the response.

I will work in what you described, in fine detail i might add.

I am highly experienced in HTML & XML, and a D&D nut from way back. I travel for my work alot, I work in IT, and this game is simply fun. When I started looking at the code I began to understand it very well. I have more questions but I am holding on to them in hopes that small amounts of light being shed will allow me to see the bigger picture. I will create new threads moving forward.

Admittedly I am also a Star Wars fan. I am not a lunatic or anything but I do love the stories and the vessels. I have built a clean YT1300 extension for Transcendence, the YT1300 is the nomenclature for the Millenium Falcon. I am polishing up the Ebon Hawk and will combine them in another mod.

The thing is it just doesn't feel right flying around in the Falcon with no Tie Fighters and that is what finally hung me up and brought me knocking to the forums.

thanks again for taking the time to respond and I will report back any success or failure.

Peace

LV

_________________
a modder is as a modder does.


Sat Jul 19, 2008 4:09 am
Profile
Militia Captain
Militia Captain
User avatar

Joined: Thu Aug 10, 2006 5:33 am
Posts: 732
Location: Area 51
Post 
Quote:
<Image imageID="&rsMediumShips1;" imageX="288" imageY="0" imageWidth="48" imageHeight="48" rotationOffset="-10" imageFrameCount="0" imageTicksPerFrame="0"/> <!-- This is various image information that I don't understand-->


<Image imageID="&rsMediumShips1;" represents the sprite sheet where the particular ship image resides.

Since sprite sheets may contain multiple ship type images, X and Y coordinates help define where the particular ship image is within the sprite sheet.
Hence: imageX="288" imageY="0"
If you were to check these coordinates within the sprite sheet in an image editor program, it is possible to change the image to another ship type, simply by checking the coordinates of that ship then replacing them in the tag. Just an example.

imageWidth="48" imageHeight="48" Defines the size of the ship based on its size within the sprite sheet.

rotationOffset="-10" Not real clear on this one but an uneducated guess would suggest it may have something to do with altering the ship's facings?

imageFrameCount="0" imageTicksPerFrame="0" This defines animation, or the lackthereof--which is the case in this example, so both are set to 0.
Depending on the animation you want, it'll be based on the sprite image itself.
Example; We'll use an animation with 4 sequences. So, imageFrameCount="0" would then be changed to imageFrameCount="4"

imageTicksPerFrame="0" defines the rate of speed of the animation, where set to "1" would be fast as to "6" being much slower. "0" means no speed or Nil

Hope this helps.


Sat Jul 19, 2008 6:54 pm
Profile
Anarchist
Anarchist

Joined: Thu Feb 07, 2008 8:43 pm
Posts: 11
Post 
News from the front:

My extension is fixed my stations are spawning and as I need them too.

examining the systems definitions closely I was able to add enough attributes to force my system to spawn more often than any other and that helped me tweak everything since I could see my station and her minions quite often.

Thanks for the tips with the images and the frame counts, I picked up on the image structure when I disected the playership.xml for my first mod in transcendence.

I have successfully added 10 player ships to my transcendence and only recently realized that I need my own UNID in order to share my code with other players.

Which is what brings me here.

I guess now I must go to work on all the graphics now that the code is solid. I will create this first as an extension and attempt the module later. I have about 60 entities to create for what I want to do. I created a cool spread sheet that automatically creaes my entity table at the top of the mod. I will share.

Peace

Lv

_________________
a modder is as a modder does.


Sat Jul 19, 2008 7:13 pm
Profile
Fleet Officer
Fleet Officer

Joined: Sat Oct 13, 2007 7:48 pm
Posts: 1259
Location: By the beach
Post 
F50, hope you don't mind if I add this to your tutorial thread:

Some information on Modifiers, Attributes, and other object filtering values.

Modifiers are for items.

Modifiers are name tags [strings] that the game uses for sorting item classes and types into as fine of detail as you could ever need.

The modifiers are defined in transcedence.xml -

Code:
<!-- ITEM TYPES ***************************************************************

   MODIFIERS

   Alien                  Item is not found in Human Space
   AntiMatter               Item is involved in AntiMatter industry
   Auton                  Item is an auton
   BlackMarketID            This is a black market ID
   Bushido                  Item is sold by Bushido corp
   Food                  Item is human food or drink
   Fuel                  Item is starship fuel
   HaloGem                  Item is a halo gem
   ID                     Item is an ID
   Illegal                  Item is illegal in Human Space
   Info                  Item consists of digital information
   Lux                     Item is human luxury good
   Makayev                  Item is sold by Makayev corp
   Meds                  Item is human medicine
   Military               Item is restricted to military in Human Space
   MilitaryID               Item is a military ID
   Missile                  Item is ammo or missile
   Nuclear                  Item is involved in nuclear industry
   Rasiermesser            Item is sold by Rasiermesser corp
   Res                     Item is a resource needed for industry
   RingerValuable            Item is used by Ringers
   Soul                  Item contains (possibly dormant) intelligence of HIG III or above
   Specialty               Item is not a commodity; for sale only in specific stations
   ZeroPoint               Item is used in Zero-point energy industry

   Consumable               Item is consumable (missiles/ammo/treasure)
   MajorItem               Device/Shield/Weapon
   MinorItem               Armor/Enhancements


Modifiers extend the basic item class definitions for items beyond rarity, value, type, name and other properties.

This allows us to have much greater control over the random selections of items and develop many other handy features like custom vendors and specialists.

You can place any string into the modifiers, and call for it in code later:

Code:
;place the new modifier in the modifiers value of the item

modifiers=  "MyModify"


now you can use search functions to find the item(s) with that modifier

There are several functions that make use of a modifier filter.
Code:
(itmCreateRandom criteria string)

(itmEnumTypes criteria variable function)

(itmHasModifier itemStruct string)


To name a few. Criteria would include the modifier after the basic filter. (as in "* +MyModify" )
-itmHasModifier the string is the modifier your want to find)



Attributes are for space objects such as stations and planets.

Attributes are used by the system definitions to place objects.

The <Labels> in systems correspond to the attributes in the space object


Sun Jul 27, 2008 5:41 am
Profile
Militia Captain
Militia Captain

Joined: Sat Mar 11, 2006 5:25 pm
Posts: 994
Post 
thanks periculi


Mon Jul 28, 2008 1:40 am
Profile
Militia Captain
Militia Captain

Joined: Sat Mar 11, 2006 5:25 pm
Posts: 994
Post 
If you know weapons tags, I need your help. If you do, could you please read what is there of section 3 and explain the <weapon> tag in detail for me? Thanks!


Thu Aug 07, 2008 6:32 pm
Profile
Miner
Miner
User avatar

Joined: Mon Jul 21, 2008 1:21 pm
Posts: 44
Post 
whats the EI modifier? you can find it in the ion cannon


Thu Sep 04, 2008 5:49 pm
Profile
Fleet Officer
Fleet Officer

Joined: Sat Oct 13, 2007 7:48 pm
Posts: 1259
Location: By the beach
Post 
You can also find it in the Laser Cannon and other weapons built by the Earth Industries manufacturing conglomerate. EI means Earth Industries. It is one of the game's weapon and item manufacturers, much like NAMI, Bushido, Raisermesser and others.


Thu Sep 04, 2008 7:11 pm
Profile
Miner
Miner
User avatar

Joined: Mon Jul 21, 2008 1:21 pm
Posts: 44
Post 
then you should add it to your list its very helpful


Fri Sep 05, 2008 2:32 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 33 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 0 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.