May 12, 2024, 18:50:34

Author Topic: How to mod the mission ships?  (Read 8063 times)

Offline SnakeLegend

  • Recruit
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
    • http://
How to mod the mission ships?
« 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.

Offline Keldane

  • Specialist
  • *
  • Posts: 73
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #1 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?

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #2 on: February 13, 2010, 20:30:00 »
We'll need some more details, I fear... what exactly are you trying to do?

Offline SnakeLegend

  • Recruit
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #3 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.

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #4 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.

Offline The Old Dragon

  • Ensign
  • ***
  • Posts: 362
  • Karma: 6
    • View Profile
    • http://
(No subject)
« Reply #5 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.
Better to look the fool by asking, then prove them right with ignorance.

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #6 on: February 16, 2010, 14:37:15 »
SetUndamageable... ah, didn't know that command :)