Results 1 to 6 of 6

Making a New Subsystem

  1. #1

    Making a New Subsystem

    I hope this is the right place to post. I signed up just yesterday. Anyways i did a quick search and found a few guides (and tried guides first at a HW2 wiki site) But i am still having issues with modifying a subsystem.

    This is the modified subsystem i am trying to add to the ship (its a customized battlecruiser. I am new to modding so i am still just playing around...for example the BC has 1mil HP xP but it's turning out to be quite fun so i want to try and mod more than just multiplayer maps, new ships and build menus.)
    Code:
    StartShipHardPointConfig(NewShipType, "Weapon IonBeam 1", "Hardpoint_IonBeam1", "Weapon", "Innate", "Damageable", "Hgn_KaabiIonBeamTurret", "", "", "", "", "", "", "", "")
    StartShipHardPointConfig(NewShipType, "Weapon IonBeam 2", "Hardpoint_IonBeam2", "Weapon", "Innate", "Damageable", "Hgn_KaabiIonBeamTurret", "", "", "", "", "", "", "", "")
    Here is the new Subsystem, Hgn_KaabiIonBeamTurret
    As you can see i have only changed the name, description, HP and file path to the weapon.

    Code:
    NewSubSystemType = StartSubSystemConfig()
    NewSubSystemType.displayedName = "Super Ion Cannon"
    NewSubSystemType.sobDescription = "Enhanced Ion Cannons Designed for Kaabi's Flagship."
    NewSubSystemType.tacticalIcon = "hexagon"
    NewSubSystemType.tacticalIconMinSize = 0.0035
    NewSubSystemType.tacticalIconMinFadeSize = 0.0045
    NewSubSystemType.tacticalIconMaxFadeSize = 0.008
    NewSubSystemType.groupMergeSize = 0.001
    NewSubSystemType.mouseOverMinFadeSize = 0.045
    NewSubSystemType.mouseOverMaxFadeSize = 0.1
    NewSubSystemType.maxhealth = 250000
    NewSubSystemType.regentime = 250
    NewSubSystemType.nlips = 0
    NewSubSystemType.nlipsRange = 0
    NewSubSystemType.nlipsFar = 0
    NewSubSystemType.nlipsFarRange = 0
    NewSubSystemType.meshRenderLimit = 0.004
    NewSubSystemType.minimumZoomFactor = 0.68
    NewSubSystemType.selectionLimit = 5000
    NewSubSystemType.preciseATILimit = 5000
    NewSubSystemType.selectionPriority = 37.5
    NewSubSystemType.type = "Weapon"
    NewSubSystemType.typeString = "BCIonBeamTurret"
    NewSubSystemType.collateralDamage = 100
    NewSubSystemType.inactiveTimeAfterDamage = 90
    NewSubSystemType.activateHealthPercentage = 0.1
    NewSubSystemType.costToBuild = 500
    NewSubSystemType.timeToBuild = 35
    NewSubSystemType.isResearch = 0
    NewSubSystemType.visible = 1
    LoadHODFile(NewSubSystemType, 1)
    NewSubSystemType.BuildFamily = "SubSystem_Hgn"
    NewSubSystemType.AttackFamily = "SubSystem"
    NewSubSystemType.DockFamily = "CantDock"
    NewSubSystemType.DisplayFamily = "SubSystemModule"
    NewSubSystemType.ArmourFamily = "SubSystemArmour"
    StartSubSystemWeaponConfig(NewSubSystemType, "Hgn_KaabiTurretedIonCannon", "Weapon_IonCan1", "Weapon_IonCan1")
    And finally, here is the weapon.

    Code:
    StartWeaponConfig(NewWeaponType, "AnimatedTurret", "InstantHit", "IonBeam_bc", "Normal", 0, 6000, 0, 6, 2, 0, 20, 0, 1, 15, 0, 0, 1, 1, 20, 20, 0.1, "Normal", 1, 0, 2000)
    AddWeaponResult(NewWeaponType, "Hit", "DamageHealth", "Target", 15000, 15000, "")
    AddWeaponResult(NewWeaponType, "Hit", "Push", "Target", -100, -100, "")
    setPenetration(NewWeaponType, 100, 1, 
    { 
        PlanetKillerArmour = 0, 
    }, 
    { 
        SubSystemArmour = 0.3, 
    }, 
    { 
        MediumArmour = 0.5, })
    setAccuracy(NewWeaponType, 1, 
    { 
        Fighter = 0, 
    }, 
    { 
        Corvette = 0, 
    }, 
    { 
        munition = 0, })
    setAngles(NewWeaponType, 20, -180, 180, -4, 60)
    setMiscValues(NewWeaponType, 0, 1)
    addAnimTurretSound(NewWeaponType, "Data:Sound/SFX/ETG/SPECIAL/SPECIAL_ABILITIES_TURRET_ON")
    Problem is, the game still crashes x.x
    after 6 hours of guessing and trying to find files im missing, renaming files, ect...i think im about to give up for now ><
    if someone notices anything wrong please let me know!

  2. #2
    the answer was right in front of my eyes >__>
    all i had to do was rename the .hod file and it worked. Took 4 hours to figure that out <.<

  3. #3
    bwahahaha...now making custom production modules and making them for specific ships is being a pain.
    I added them to the build.lua and the new build families to its respective .lua as well as changed the ships canbuild code to

    Code:
    addAbility(NewShipType, "CanBuildShips", 1, "KaabiFighter_Hgn, SubSystem_Hgn", "KaabiFighter, SubSystemModule")
    KaabiFighter_Hgn is the new family and KaabiFighter is the new display name. I triple checked the sub and ship files for typos but it all looks fine....the game still crashes though DX I made sure KaabiFighter was on the dock capable list on the ship i want to build them too.

    I looked at the games files and it all looks fine but i have to be missing something somewhere z.z
    Anyone mind helping? ^^ with luck ill figure it out on my own like the first problem in my top post but help would still be nice. I followed a guide to get this far...still dont know why the game is crashing...so i played around and removed the build families and the game loads. The new production module loads just fine too (yeah i already made sure to add it to the .Hod file, of course) but now it wont let me build the fighters at all z.z in fact it treats the fighters like a subsystem, i think (and yes the files are in a folder in the subsystem directory). I also made sure to rename the ships family back to just Fighter and to add the ability to build the fighter family back on the ship i want to build it. I also made sure to not tamper with the build familiesSo now the production module will load but i still cannot build anything i created DX

    here are my codes.

    The new bomber ship:
    Code:
    NewShipType.BuildFamily = "KaabiFighter_Hgn"
    NewShipType.AttackFamily = "Fighter"
    NewShipType.DockFamily = "Fighter"
    NewShipType.AvoidanceFamily = "Strikecraft"
    NewShipType.DisplayFamily = "Fighter"
    NewShipType.AutoFormationFamily = "Fighter"
    NewShipType.CollisionFamily = "Small"
    NewShipType.ArmourFamily = "Unarmoured"
    NewShipType.UnitCapsFamily = "Fighter"
    Here is the Production Module:

    Code:
    NewSubSystemType = StartSubSystemConfig()
    NewSubSystemType.displayedName = "Super Fighter Production"
    NewSubSystemType.sobDescription = "Produces Enhanced Fighters and Bombers"
    NewSubSystemType.tacticalIcon = "hexagon"
    NewSubSystemType.tacticalIconMinSize = 0.0035
    NewSubSystemType.tacticalIconMinFadeSize = 0.0045
    NewSubSystemType.tacticalIconMaxFadeSize = 0.008
    NewSubSystemType.groupMergeSize = 0.001
    NewSubSystemType.mouseOverMinFadeSize = 0.045
    NewSubSystemType.mouseOverMaxFadeSize = 0.1
    NewSubSystemType.maxhealth = 80000
    NewSubSystemType.regentime = 250
    NewSubSystemType.nlips = 0
    NewSubSystemType.nlipsRange = 0
    NewSubSystemType.nlipsFar = 0
    NewSubSystemType.nlipsFarRange = 0
    NewSubSystemType.meshRenderLimit = 0.004
    NewSubSystemType.minimumZoomFactor = 0.68
    NewSubSystemType.selectionLimit = 5000
    NewSubSystemType.preciseATILimit = 5000
    NewSubSystemType.selectionPriority = 37.5
    NewSubSystemType.type = "System"
    NewSubSystemType.typeString = "FighterProduction"
    NewSubSystemType.collateralDamage = 100
    NewSubSystemType.inactiveTimeAfterDamage = 10
    NewSubSystemType.activateHealthPercentage = 0.1
    NewSubSystemType.costToBuild = 2500
    NewSubSystemType.timeToBuild = 5
    NewSubSystemType.isResearch = 0
    NewSubSystemType.visible = 1
    LoadHODFile(NewSubSystemType, 1)
    NewSubSystemType.BuildFamily = "KaabiFighter_Hgn"
    NewSubSystemType.AttackFamily = "SubSystem"
    NewSubSystemType.DockFamily = "CantDock"
    NewSubSystemType.DisplayFamily = "Fighter"
    NewSubSystemType.ArmourFamily = "Unarmoured"
    loadShipPatchList(NewSubSystemType, "data:sound/sfx/ship/Hiigaran/Subsystems/", 1, "HPSubsystemFighterAmb")
    Here is what i added to the build.lua

    Code:
    	{ 
            Type = SubSystem, 
            ThingToBuild = "Hgn_Kaabi_Production_Fighter", 
            RequiredResearch = "", 
            RequiredShipSubSystems = "", 
            DisplayPriority = 0, 
            DisplayedName = "Super Fighter Production", 
            Description = "Produces Enhanced Fighters and Bombers", },
    and
    Code:
    	{ 
            Type = Ship, 
            ThingToBuild = "Hgn_KaabiAttackBomber", 
            RequiredResearch = "", 
            RequiredShipSubSystems = "Hgn_Kaabi_Production_Fighter", 
            DisplayPriority = 35, 
            DisplayedName = "Enhanced Fighters", 
            Description = "Fighters Enhanced by Kaabi's Flagship", },
    finally... z.z the flagship

    Code:
    addAbility(NewShipType, "CanBuildShips", 1, "KaabiFighter_Hgn, SubSystem_Hgn", "Fighter, SubSystemModule")
    If anyone see's something wrong don't hesitate to say something~

    Oh and apparently the new bombers don't recognize the subsystem. If i build the subsystem, the bombers still stay gray instead of colored in and build-able. I have the bombers required subsystem pointing to the exact name of the subsystem but nothing worked z.z
    Last edited by LennethValkyrie; 9th Jun 12 at 3:18 PM.

  4. #4
    Woots, so solved that nvm~
    i spend two or three hours trying to fix something, run out of ideas, then suddenly try once more and fix it lawl
    I should wait longer next time i have a problem so I'm not spamming the forum x3
    But at this rate i will have my own mod without even needing help, yay~

  5. #5
    Member Fenra's Avatar
    Join Date
    Apr 2011
    Location
    US East
    You shouldn't be posting here, instead you should be posting here. If you are an actual modder and not just tinkering, there are also many mod projects looking for active modders to help develop and design. You should seek them out.

  6. #6
    Thank you very much and sorry for posting in the wrong section ;c

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •