Support | News | Classic | F.A.Q. | Discord | Discussions | Wiki | Roadmap
  • Edited

Please see this Wiki guide to learn how to create and share mod packages that other players can install.

If you are creating a translation of Cosmoteer into another language, you can read this simplified Wiki guide specifically about translations.

Walt stickied the discussion.

    Walt I have this error:

    Error loading mod Lafiel.Abh_mod: Deserialization from source "<C:\Games\Cosmoteer\Mods\Lafiel.Abh_mod\mod.txt>/Actions/0/ManyToAdd/24" failed.
    

    It looks like I can only add 24 parts but I have more than 30.

    Edit: Well, it takes 24 parts but freezes right away. It looks like it has a problem with
    Data\Ship\Terra\priorities.txt

    Edit2: Same problem with Effects/particles.txt. Looks like the parser has some problem (tabs? in mod.txt).
    Solved

    Lafiel I'm not sure what's going on. Send me a copy of your mod and I'll figure it out.

    • Edited

    Lafiel The issue is that, in order to add named data fields, you should use the Overrides action, not the AddMany action. So for example, your action that adds particle effects should be:

    	// Add the "new" effects to Effects/particles.txt.
    	{
    		Action = Overrides
    		OverrideIn = <Effects/particles.txt>
    		Overrides
    		{
    			PhaserShoot = &<Particles/Abh-mod/phaser_shoot.txt>;
    			PhaserShotGlow = &<Particles/Abh-mod/phaser_shot_glow.txt>;
    			PhaserHit = &<Particles/Abh-mod/phaser_hit.txt>;
    			PhaserBeamHit = &<Particles/Abh-mod/phaser_beam_hit.txt>;
    			PhaserHitStruct = &<Particles/Abh-mod/phaser_hit_struct.txt>;
    			PhaserBeamHitStruct = &<Particles/Abh-mod/phaser_beam_hit_struct.txt>;
    			PhaserPenetrate = &<Particles/Abh-mod/phaser_penetrate.txt>;
    			PhaserFlash = &<Particles/Abh-mod/phaser_flash.txt>;
    			PhaserBeamFlash = &<Particles/Abh-mod/phaser_beam_flash.txt>;
    			PhaserSparks = &<Particles/Abh-mod/phaser_sparks.txt>;
    			PhaserEmitSparks = &<Particles/Abh-mod/phaser_emit_sparks.txt>;
    
    			PhotonTorpHit = &<Particles/Abh-mod/photon_torp_hit.txt>;
    			PhotonTorpHitStruct = &<Particles/Abh-mod/photon_torp_hit_struct.txt>;
    			PhotonTorpPenetrate = &<Particles/Abh-mod/photon_torp_penetrate.txt>;
    			PhotonTorpFlash = &<Particles/Abh-mod/photon_torp_flash.txt>;
    			PhotonTorpSparks = &<Particles/Abh-mod/photon_torp_sparks.txt>;
    
    			PlasmaShoot = &<Particles/Abh-mod/plasma_shoot.txt>;
    			PlasmaShotGlow = &<Particles/Abh-mod/plasma_shot_glow.txt>;
    			PlasmaHit = &<Particles/Abh-mod/plasma_hit.txt>;
    			PlasmaHitStruct = &<Particles/Abh-mod/plasma_hit_struct.txt>;
    			PlasmaPenetrate = &<Particles/Abh-mod/plasma_penetrate.txt>;
    			PlasmaFlash = &<Particles/Abh-mod/plasma_flash.txt>;
    			PlasmaSparks = &<Particles/Abh-mod/plasma_sparks.txt>;
    
    			MedAntiprotonShoot = &<Particles/Abh-mod/medium_antiproton_shoot.txt>;
    			MedAntiprotonShotGlow = &<Particles/Abh-mod/antiproton_shot_glow.txt>;
    			MedAntiprotonShotHit = &<Particles/Abh-mod/antiproton_shot_hit.txt>;
    			MedAntiprotonHitStruct = &<Particles/Abh-mod/medium_antiproton_hit_struct.txt>;
    			MedAntiprotonPenetrate = &<Particles/Abh-mod/antiproton_penetrate.txt>;
    			MedAntiprotonFlash = &<Particles/Abh-mod/antiproton_flash.txt>;
    			MedAntiprotonSparks = &<Particles/Abh-mod/antiproton_sparks.txt>;
    
    			BigAntiprotonShoot = &<Particles/Abh-mod/big_antiproton_shoot.txt>;
    			BigAntiprotonShotHit = &<Particles/Abh-mod/big_antiproton_shot_hit.txt>;
    			BigAntiprotonHitStruct = &<Particles/Abh-mod/big_antiproton_hit_struct.txt>;
    			BigAntiprotonFlash = &<Particles/Abh-mod/big_antiproton_flash.txt>;
    
    			ImpulseThrusterGlow = &<Particles/Abh-mod/impulse_thruster_glow.txt>;
    		}
    	}

    I'll have better error messages for this in the next version.

    Walt OK, got it.

    I got a new problem which shouldn't be: FirstCrewJobPriority (see end of page)
    Solved

    Lafiel OverrideIn = <Effects/particles.txt>

    You're overriding the particles file, not the priorities file.

    Also, I'm working to reduce the number of annoying ../../../ path references in part files to make them easier to mod. Should have improvements in the next version sometime today.

    Walt Argh. Didn't see that.
    My will my new path edits until now still work?

    Lafiel Also, just FYI, you don't actually have to put the priorities in the priorities.txt file. I just did that because I like seeing all the priorities in one place. If it's easier for you, in your mod you can simply do:

    FirstCrewJobPriority = 100

    Or you can make your own priorities file and reference that.

    Lafiel My will my new path edits until now still work?

    Yes, those should still work fine since I'm not actually moving the priorities.txt file, I'm just providing another way to access that file without having to use a directory path.

    Walt Cool.

    Froze again. This time the log doesn't help.

    Halfling.ObjectText.OTNavigateException: Unable to find node at path "<Effects/priorities.txt>".
    Halfling.ObjectText.OTNode.FindAtPath(String path) in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\ObjectText\OTNode.cs:line 254.
    Cosmoteer.Mods.ModOverridesAction.ApplyAction(OTFile rulesFile) in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Mods\ModOverridesAction.cs:line 21.
    Cosmoteer.Mods.ModInfo.ApplyMod(OTFile rulesFile) in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Mods\ModInfo.cs:line 43.
    Cosmoteer.Assets.ApplyMods(OTFile rulesFile) in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Assets.cs:line 256.
    Cosmoteer.Assets.LoaderThread() in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Assets.cs:line 231.
    

    Lafiel Unable to find node at path "<Effects/priorities.txt>".

    The priorities.txt file is in Ships/Terran, not Effects. I think you've been starting at your code for too long. 😉

    Walt HUH!?
    I see it under Data!!!

    Lafiel The priorities file is at <Ships/Terran/priorities.txt>. Is it possible you accidentally moved the file?

    Walt Alright fixed. I think I need a break.

    Lafiel I know how you feel! 😉

    2 months later

    Is there supposed to be an example mod for rooms?

    Stormageddon01 Is there supposed to be an example mod for rooms?

    Check out the Abh Mod, which has just been updated to work with 0.12.x.