Adding Abilities

Hello, all- I'm new to the modding scene and wonder if something's possible.

I'm working on a refit of the game for myself and a few friends (And possibly publication if it actually works). I've started by modding the TEC, and will work on the other races after. My question is, however. I'd like to add an ability similar to the Ion Burst that the Colony ship has at the end of the "Weapons upgrade" tree. It woudl only be able to target capships. I can code the weapon, but I can't figure out how to ADD it so that it's unlockable- and so that it'll show in the UI. Advice?

 

Edit for clarity- The ability would ONLY be for the TEC Starbase, and ONLY after the beam/missile upgrades.

15,768 views 42 replies
Reply #1 Top

I'd also, as an aside- like to know how to add weapons. I intend to put about half the firepower of a Garda onto carriers (Or the race-specific alternative.)

Reply #2 Top

To add it to a ship, there will be a section of that ships .entity file that lists its abilities. It is near the top of the file for capitalships and near the bottom for everything else. They are usually labeled ability0 etc.

To add it to the research tree, you need to create a new research file and then add a reference to that file to the research section of the playerTECH entity file. Also what version of Sins are you making the mod for?

Also, just from experience, allowing frigates to disable capitalships is a bad idea for balance. It becomes too easy just to build enough of them and permenantly keep all of the enemy capital ships from doing anything.

Reply #3 Top

First; It's to be added to a STARBSE, not a frigate. I intend to give the TEC one a temporary Ion Bolt, one that'll use up most of the stations antimatter.

 

Second, v. 1.051 of Entrenchment.

I simply wanted it to be an addon to the upgrade tree- "Beam," "Missile," "Ion."

 

Reply #4 Top

Sorry if my intro was pretty vague. >.<

Reply #5 Top

the ability would need an extra mesh to add the new ability's launchpoint(s), but it could be done.

also you will probably want to increase the number of upgrades for the starbase, and that is easy

harpo

 

Reply #6 Top

A mesh? I thought if I was firing it from the 'center' of the station (As in, doesn't have to turn to fire) it would be okay- right? Just... an ion bolt that fires from the station?

Reply #7 Top

Cos I don't know how to model yet. All I know how to do is fiddle with the .txt files...

Reply #8 Top

You can add another mesh (hardpoint) without re-modeling. Open the starbases mesh file and copy 1 of the points. then re-name it. If you want it to be located in the center then copy the 1 named "Center". Paste it in with all the other points, re-name it to "Ability-2" . Add the name of your new Ion ability in the " " alongside Ability:2 in the starbase's entity file.

Oh! and don't forget to add to the point count in the mesh file once you have added the extra point.

Then do as GoaFan&77 has said

To add it to the research tree, you need to create a new research file and then add a reference to that file to the research section of the playerTECH entity file
End of quote
Also don't forget to add it to the entity manifest along with your new ability. You will also need to find a location on the research block to put your new research button and add its location within the block to your new research's entity file. For example
    block 0
    pos [ 3 , 0 ]

block #  - reffers to which block the research will appear in (oddly enough)

The pos [ 3 , 0 ] reffers to firstly the column and secondly the row that the button appears within the block. Note that the first column and row are numbered 0, second 1 and so forth.

hope this helps.

Reply #9 Top

Uh. Okay, I messed up something royal. This is gonna sound horribly newbish. Is there a guide, with examples, about this somewhere? I'm just not understanding it.

Reply #10 Top

All I'm trying to do is add an ability that'd be research after the "Beam" and then "Missiles" addons- a fourth level, that uses Antimatter.

Reply #11 Top

Ah! I don't think that it is possible. I think the UpgradeProperty - propertytype is hard coded. I could be wrong. You could try and put the "AbilityIonBlast" as a propertytype for your fourth stage, but no garenties that will work, I haven't tried that.

It may be that the only way is to use 1 of the starbase's ability slots.

Best of luck.

Reply #12 Top

Well, it's hard coded- the game minidumped hard. How so I go about using an ability slot then?

 

(Sorry for the newbishness. Until now, I've spent my time doing little more than futzing around with range, damage, cooldown, antimatter cost, etc.)

Reply #13 Top

ability:2  is where i'd have to put it, i guess. To start with, I think I'll replace the 'auxilury government" upgrade with the "Ion" ability. Er, how do I do that- cos one's a constant and one's a weapon...?

Reply #14 Top

Update. I got it to show up in the reseach tree. But now I have to figure out how to fit the ship ability to the station.

Reply #15 Top

okay, I seriously need help here. I can't figure out how to add it to the station.

Reply #16 Top

What do I put in the "StarBaseUpgradeTech(name) file? x.x

Reply #17 Top

Or not. Is there a step-by-step somewhere? x.x

Reply #18 Top

Ok! to add the "AbilityIonBlast" to your Starbase you don't use the "StarbaseUpgradeTech" file. Use the "StarBaseTech" entity file. Open it and at the top there are 5 ability slots numbered 0-4. Ability 2 and 4 are vacant. I would suggest using the ability 2 slot because 4 button is not there in-game and like CapitalShips is for a passive ability. In the "" to the left of Ability-2: type in AbilityIonBlast exactly the same as that abilities entity file name, ( can be whatever ability you want).

 

Update. I got it to show up in the reseach tree. But now I have to figure out how to fit the ship ability to the station.
End of quote

Note: If you have put the ability "AbilityIonBlast" in the research tree, remember that ability, the Tech Colony capital uses originally. So it wont be available for it until it is researched now.

If you want the Tech Colony cap. to have that ability as it originally does, then copy the "AbilityIonBlast" and paste it into your mod's gameinfo folder, then re-name it to something else for your starbase. Something like "AbilityIonStrike" or whatever just so long as its different. In the 'StarBaseTech" entity file put "AbilityIonStrike" in the ability-2: "" slot. Also re-name your new research entity file to  "RESEARCHSUBJECT_ABILITYACCESS_ABILITYIONSTRIKE"

And then to link the ability "AbilityIonStrike" to the research file put in "RESEARCHSUBJECT_ABILITYACCESS_ABILITYIONSTRIKE" under the NumResearchPrerequisites 0 line in the AblityIonStrke file. It should look like this

Prerequisites
    NumResearchPrerequisites 1
    ResearchPrerequisite
        Subject "RESEARCHSUBJECT_ABILITYACCESS_ABILITYIONBLAST"
        Level 1

Sorry for the late response, I probably in a different time zone.

Reply #19 Top

no worries about delay! I've just been poking around, and causing minidumps. XD And here goes, I'm about to try this. I named it IonCannon.

Reply #20 Top

Well that didn't work. Somehwo whatever I did minidumps the game on mod activation. x.x

 

Reply #21 Top

Is there a way I can post the modded files, so you can take a look and tell me what I'm messing up? You obviously know a TON more than I do.

 

http://www.mediafire.com/?xawi0dz51yz

 

 

That's the dl link. Long live mediafire.

Reply #22 Top

(Repost Deleted)

Reply #23 Top

Ok! Firstly, you have to change your researchInfo count from 117 to 118 after adding the extra RESEARCHSUBJECT to the PlayerTech entity file

        Second your "RESEARCHSUBJECT_ABILITYACCESS_ABILITYIONCANNON" entity file needs the prerequisites changed to NumResearchPrerequisites 0 and remove the lines

   ResearchPrerequisite
        Subject "RESEARCHSUBJECT_FRIGATEACCESS_STARBASECONSTRUCTORTECH"
        Level 1

Also you need to move its location from where "AuxilleryGovernment" is within the defence Block-block 0 [ 3 , 2 ]. It can't be a StarBaseUpgrade. So it would be best if you change that back to AuxilleryGovernment in the StarBaseTech entity file also.

It will show up as an ability should be top row third button along when you select your starbase in game.

Relolcate your new RESEARCHSUBJECT_ABILITYACCESS_ABILITYIONCANNON to block 0 [ 3 , 0 ]

Then in your new "AbilityIonCannon" entity file, you still need to link it to the new "RESEARCHSUBJECT_ABILITYACCESS_ABILITYIONCANNON" file by including the researchPrerequisite

    NumResearchPrerequisites 1
    ResearchPrerequisite
        Subject "RESEARCHSUBJECT_ABILITYACCESS_ABILITYIONCANNON"                                                                           Level 1                                                   

        Don't forget to add your newly created entity files name's to the entity manifest file of your mod, and adjust the entitynamecount up the amount of new names you include.

Reply #24 Top

Okay! IT's almost there! *bows in reverence* Thank you, oh almighty guru of gaming awesomeness!

 

now... why does the game minidump when I try to deploy the RAloz? ._.

 

Also, will the

nameStringID ""
descStringID ""
hudIcon ""
smallHudIcon ""
infoCardIcon ""

at the end of the ABility cause a problem?

And is the failure related to the fact that there's no buff coded? x.x

Reply #25 Top

now... why does the game minidump when I try to deploy the RAloz? ._.
End of quote

Does the game crash when the Raloz comes out of the frigate factory or when it is supposed to turn into a starbase? What original file's did you use to make your RESEARCHSUBJECT_ABILITYACCESS_ABILITYIONCANNON file?. You may have inadvertantly altered 1 if you have been using files in the install folder, or if your mod's GameInfo folder has all the entrenchment files in it, and you copied parts out of those files.

[quote]Also, will the

nameStringID ""
descStringID ""
hudIcon ""
smallHudIcon ""
infoCardIcon ""

at the end of the ABility cause a problem?[quote]

Yes (although I don't think that is the cause of your crash), add the nameStringID and descStringID to the english file of the String folder in your mod folder.

thus;

StringInfo
    ID "IDS_ABILITY_IONCANNON_NAME"
    Value " Starbase Ion Cannon"
StringInfo
    ID "IDS_ABILITY_IONCANNON_DESCRIPTION"
    Value "Activates Argonev Starbase's Ion bolt weapon."

and also

StringInfo
    ID "IDS_RESEARCHSUBJECT_ABILITYACCESS_ABILITYIONCANNON_NAME"
    Value "Starbase Ion Cannon"
StringInfo
    ID "IDS_RESEARCHSUBJECT_ABILITYACCESS_ABILITYIONCANNON_DESCRIPTION"
    Value "Grants the Ion cannon ability to Argonev Starbase"

Remember to increase the Stringcount at the top of the file by 4.

The Icons are not so important. The new ability will just use the same button textures as "AbilityIonBlast". You could also use those for your "RESEARCHSUBJECT" button on the research tree. You could create your own but that would be extra to explain how, and we should concentrate on getting your mod running.

And is the failure related to the fact that there's no buff coded? x.x
End of quote

No, your new ability uses the "AbilityIonBlast" buff. It essentially has the same effects and damage. That can be changed later by creating new buffs for your new ability, but we should get the thing working first up.

On a side note, have you been using the Dev,exe?. I have found this to be helpful in sorting out problems in the past