Nexus Skirmisher

Nexus Modding => Mod Development / Released Mods => Topic started by: SnakeLegend on February 13, 2010, 06:01:06

Title: How to mod the mission ships?
Post by: SnakeLegend on February 13, 2010, 06:01:06
Like topic said, i tried to get some stuffs active but somehow it is like not in working condition.
Title:
Post by: Keldane on February 13, 2010, 07:11:46
Are you trying to mod the ships used in the game's campaign? Or ships used in a specific mission in a mod you're creating?
Title:
Post by: Arparso on February 13, 2010, 20:30:00
We'll need some more details, I fear... what exactly are you trying to do?
Title:
Post by: SnakeLegend on February 15, 2010, 12:31:03
Well i am trying to get the Campaigns ships working like god mode and tried to mod some scripts that was told online by some fellows.
Tried but i am not sure if i did it correctly.
Title:
Post by: Arparso on February 16, 2010, 11:53:36
You want to make all your ships indestructible? Why?

Anyway, you could bump up the HpMax values in universetacticstacticstypes.ini for the classes you use, but that would also increase the HP of all hostile human ships. You could also edit each mission file in universemissionsepisodes to include the following code snippet:

Code: [Select]
RULE event SceneInit
:action
GetMachine("GodMode"):ChangeState(default, 0);
:end
END

MACHINE "GodMode"

STATE default

RULE event Tick
:action
SelectEx((s.ship | s.wreck) & s.race=#race_player,
s.this:damage := 0;
);
:end
END

TICK 0.1

END

END

Or better yet, save that snipped as a seperate file in the same folder as "godmode.inc" and just insert [code=orange]#include "godmode.inc"[/color] in each mission file after its SceneInit event.

This script would try to keep all player ships at maximum health. It would only fail, if you encounter an enemy weapon capable to destroy your in one shot.
Title:
Post by: The Old Dragon on February 16, 2010, 14:28:09
Or maybe add this to the SceneInit rule...

Code: [Select]
FleetPlayer:=GetFreeSel();
SelectShips(FleetPlayer,S.race=#race_Player);
ExecList(FleetPlayer,
                SetUndamageable(S.this,1);
);

As Arparso said, you caould also have it as an 'include' file.
Title:
Post by: Arparso on February 16, 2010, 14:37:15
SetUndamageable... ah, didn't know that command :)