Variable/Placeable Help
#1
Posté 11 juin 2011 - 12:16
The placeables in the area are already there I just cannot figure out how to make them have this int on them on load.
nFlammable int 1
Anyone have any suggestions?
#2
Posté 11 juin 2011 - 01:17
That sort of thing would need an actual programmer to make, but it would be doable, since GFF Editor allows variables to be manually added into the placeables, albeit in a more time consuming than in toolset way.
#3
Posté 11 juin 2011 - 04:00
You can download it here:
Download
Quite simply, it allows you to use letoscript on files without the server having to be running.
Example Scripts:
Make all the static places in an area nonstatic and plot, and up their fort save to 100, in preparation for a 'fire burns trees' edit:
%git = 'temp0/canopy4.git';
for (/{'Placeable List'}) {
if (/~/Static == 1) {
/~/Static = 0;
/~/Plot = 1;
/~/Fort = 100;
print /~/Tag, "\\n";
}
}
%git = '>';
%close(%git);
For every area in the module whose resref is prefixed with 'ele_earth_', check all the triggers whose resref is 'newtransition', set their OnClick script to hg_area_trans, and set a CheckEnv int to value 3 on them.
%mod = 'Path of Ascension CEP Legends.mod';
for (%mod['ele_earth_*.git']) {
for (/{'TriggerList'}) {
if (/~/TemplateResRef eq 'newtransition') {
/~/OnClick = 'hg_area_trans';
add /~/VarTable, type => gffList unless /~/VarTable;
add /~/VarTable/Name, type => gffString, value => "CheckEnv";
add /~/VarTable/[_]/Type, type => gffDword, value => 1;
add /~/VarTable/[_]/Value, type => gffInt, value => 3;
}
}
}
%mod = '>';
close(%mod);
Moneo is also extremely useful for data mining. This script prints out a list of all the item resrefs in the module that have the 'MissileResref' variable set on them.
%mod = 'Path of Ascension CEP Legends.mod';
for (%mod['*.uti']) {
for (/VarTable) {
if (/~/Name eq "MissileResref") {
print /TemplateResRef, " ", /~/Value, "\\n";
}
}
}
I have dozens upon dozens of example scripts like this for you to extrapolate from, if you want them. Having a gff viewer like Alia is extremely handy when doing this stuff, as it allows you to figure out what fields are name, and see what fields a given file has. You can find Alia here:
Download
If you'd like me to show you how to set Moneo up and use it, or just want the sample scripts, contact me via yahoo instant messenger - I'll pm you the username.
Funky
Modifié par FunkySwerve, 11 juin 2011 - 04:06 .
#4
Posté 11 juin 2011 - 04:31
1 - First make a back up of your module, Just incase.
2 - Then replace your module on load script with something like this.
void main()
{
object oArea = GetObjectByTag("TAG OF AREA");
object oPlacable = GetFirstObjectInArea(oArea);
while (GetIsObjectValid(oPlacable))
{
if (GetObjectType(oPlacable) == OBJECT_TYPE_PLACEABLE)
SetLocalInt(oPlacable, "nFlammable", 1);
oPlacable = GetNextObjectInArea(oArea);
}
}
3 - Run the module and save the game.** .
4 - Open the Saved Game with the Toolset.
5 - Export the area.
6 - Open the module and inport the Area.
7 - Change your OnModLoad back to its original script.
** It is a good Idea to make sure no PC/DM enters the area you are going to export
Modifié par Lightfoot8, 11 juin 2011 - 04:38 .
#5
Posté 12 juin 2011 - 12:06
FunkySwerve wrote...
If you'd like me to show you how to set Moneo up and use it, or just want the sample scripts, contact me via yahoo instant messenger - I'll pm you the username.
Funky
Who would want help from a good scripter? Screw that noise I like fumbling around in the dark like a deaf man....
(pm sent)
Modifié par TSMDude, 12 juin 2011 - 12:07 .
#6
Posté 12 juin 2011 - 12:07
I will give ti a quick whirl and see if that works, LF.Lightfoot8 wrote...
1 - First make a back up of your module, Just incase.
2 - Then replace your module on load script with something like this.void main()
{
object oArea = GetObjectByTag("TAG OF AREA");
object oPlacable = GetFirstObjectInArea(oArea);
while (GetIsObjectValid(oPlacable))
{
if (GetObjectType(oPlacable) == OBJECT_TYPE_PLACEABLE)
SetLocalInt(oPlacable, "nFlammable", 1);
oPlacable = GetNextObjectInArea(oArea);
}
}
3 - Run the module and save the game.** .
4 - Open the Saved Game with the Toolset.
5 - Export the area.
6 - Open the module and inport the Area.
7 - Change your OnModLoad back to its original script.
** It is a good Idea to make sure no PC/DM enters the area you are going to export





Retour en haut






