SO, one file can be sufficient for all osiris story that are related to my mod (beside organisation issues ?)
Some other example please, and should be well enough fed to get me going:
So I have this script:
Code
INIT
	ITEM:__Me
	EXTERN CHARACTERTEMPLATE:%animalToSpawn=null
	
EVENTS
EVENT onuseitem
VARS
FLOAT3:_trackspositions
FLOAT3:_spawnDestination
CHARACTER:_Source
ON
OnUseItem(_Source,__Me)

ACTIONS
IF "c1"
IsRandom(0.4)
THEN
GetRandom(_spawnDestination,{-2;0;2},{2;0;-2},{2;0;2},{-2;0;-2},{-2;0;0},{2;0;0},{0;0;-2},{0;0;2})
GetPosition(__Me,_trackspositions)
Add(_trackspositions,_spawnDestination)
SpawnCharacter(_,%animalToSpawn,_trackspositions,0)
DisplayText(__Me,"You successfully follow the tracks",3)
//DialogStart(_,"dialog_tracks",__Me,_Source)
ELSE
DisplayText(__Me,"You fail to follow the tracks",3)
ENDIF
ItemDestroy(__Me) 

that is tied to an item, whatever.
I would like to add much more variables to that script, like some player tags (whether he is novice, companion, or master tracker, I already have this dialog running, and it works fine), and maybe some equipment check.
Then, I would like to give the player XPs if he succeeds (and a little more if he fails, whatever).

I am pretty sure I need to use Osiris at some point, but how to do this ? I guess I can create a story, but how do I refer to that particular object. Actually, this would be a template, because those objects are created on the fly (when a creature disappears, it leaves "tracks", this item, so they are created on the fly)
Moreover, but it is much less "urgent" I know it is possible to create functions, in script and osiris ? Some links or tuts ?

Thank you so much for your help people, especially you SniperHF.



Un chemin de 1000 lieues commence par un premier pas.

Project:
Steam workshop Frontiere