Few questions about modding

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Tromblon
Posts: 6
Joined: Sat, 21. Feb 15, 22:55

Few questions about modding

Post by Tromblon »

Hi everybody,

Can someone help me about modding ?

What are the steps (subtleties) to create an “immortal” npc ?
Actually, my unique npc are created when <event_cue_signalled cue="md.Setup.GameStart" /> and pop in player zone. When I start a new game, I can’t call them but if I save and load it I can call them (why, idk but that is not a problem for now). And unfortunately, if i move to a different sector my unique npc are destroyed (the problem)

It is possible to create a new type of entity (add in entitytype array) ?

Or create a new XML Schema Definition recognized by the game ? for implements new functions or variables

I enjoy modding this game, but actually it is very painfull… mp me please if you can provide the dead software anark studio 4 :)

Thanks
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

whats the purpose of these npcs?
and what do you do to create them?
did you assign him a custom Dialogue Tree? or keep the defaultt one? (not entirely sure, but i think thats what destroys them when the player is out of sight, i may get more info on this during this week because its closely related to my current Project)

also you can change xsd files, but thats pointless because they describe only what kind of commands the Game accepts (the file format), they do not implement any actual functionality.

regarding Interface Modding as your small Text indicates: look at the Stickies - there is an UI Modding Thread opened by EGO with lots of Info ;)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Tromblon
Posts: 6
Joined: Sat, 21. Feb 15, 22:55

Post by Tromblon »

whats the purpose of these npcs?
Emperor/ President/ Master of Faction Y. Be an
what do you do to create them?
at

Code: Select all

<event_cue_signalled cue="md.Setup.GameStart"/>

Code: Select all

<create_cue_actor cue="myCue" name="global.$myPresident" macro="president_beryll_macro"/>
				<set_entity_type entity="global.$myPresident" type="entitytype.manager"/> <!-- want entitytype.emperor :)) -->
				<set_comm_handler actor="global.$myPresident" customhandler="true"/>
did you assign him a custom Dialogue Tree? or keep the defaultt one?
Custom, but i use custom menu instead of dialogue tree. I have one specific xml file for that.
for non example :

Code: Select all

<event_conversation_started actor="global.$myPresident"/>

Code: Select all

<open_conversation_menu menu="mymod_propositions" param="[myParams]"/>
UI Modding Thread opened by EGO with lots of Info
Indeed, but i'm waiting for tools :D. I'll look for commandline which can prevent me a lot of load and reload or alt+tab

sorry, english is not my native language so a bit hard to explain me
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Tromblon wrote: ... I'll look for commandline which can prevent me a lot of load and reload or alt+tab
There's a reloadui command that allows you to reload the UI without having to restart the game. No experience with that particular command, but refreshai registers changes in ai scripts, although it does not load files which were not present at game initialization. More time savers here.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

ok for cue actors: was the cue to which it is associated still active? or any of its sub-cues? did it even exist?

related to the dialogue Tree:
did you execute the <set_comm_handler actor="global.$myPresident" customhandler="true"/> in the parent cue of your custom dialogue Tree? because this Command defines that the Sub-Cues from there are responsible for this Actors conversations from now on, and it wouldnt work if its a sibling cue. (may only apply to <event_conversation_started /> to prevent accidental start of multiple Conversations with one Actor, not sure)
Also the Comm handlers need to be instantiated, otherwise they only work once ;)
a comparatively short example for this is NPC_Shiptrader_Small where you can copy the basics

Note: most stuff i write is based on Experience, Comments in the Game Files and Looking through the Game files - no guarantee for complete accuracy ;)

Regarding the Language: English is not my native Language, too - so if you prefer German we can switch over to the German Forum if that is your native language by chance ;)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Tromblon
Posts: 6
Joined: Sat, 21. Feb 15, 22:55

Post by Tromblon »

ok, now i know why my unique NPC was destroyed. That's because, i had create them in a ship where the commander executed

Code: Select all

<start_script object="$Commander" name="'move.die'"/>
:oops: I have to look at the aiscript

Return to “X Rebirth - Scripts and Modding”