Nox Script 3.0 and NoxTools on GitHub

Everything related to modding, mapping and software or hacks

Re: Nox Script 3.0 and NoxTools on GitHub

Postby panic » Tue Aug 23, 2016 10:36 am

very thank you!!

this script editor is good !!

it was perfect!
panic
Adept
Posts: 198
Joined: Thu Nov 12, 2015 3:47 pm

Re: Nox Script 3.0 and NoxTools on GitHub

Postby panic » Tue Aug 23, 2016 11:59 am

i find nox code error ....

isCaller(int) / returns: bool
isTrigger(int) / returns: bool

however current version display returns void from this code..

please fix it.
i add pictures.
Attachments
bug03.jpg
is can returns bool
bug03.jpg (110.36 KiB) Viewed 1076 times
bug02.jpg
wrong_display_void...
bug02.jpg (163.1 KiB) Viewed 1076 times
bug01.jpg
this code is not void!
bug01.jpg (186.68 KiB) Viewed 1076 times
panic
Adept
Posts: 198
Joined: Thu Nov 12, 2015 3:47 pm

Re: Nox Script 3.0 and NoxTools on GitHub

Postby zoaedk » Tue Aug 23, 2016 12:47 pm

Oops. Thanks for catching that. I'll fix it.

Looks like I also messed up the return type of GetQuestStatus and GetQuestStatusFloat.
zoaedk
Global Moderator
Global Moderator
Posts: 42
Joined: Sat Jul 04, 2015 12:09 pm
Location: Austin, TX, USA

Re: Nox Script 3.0 and NoxTools on GitHub

Postby panic » Tue Aug 23, 2016 1:36 pm

look picture...
Attachments
bug_01.jpg
it was my opinion...
bug_01.jpg (171.05 KiB) Viewed 1070 times
panic
Adept
Posts: 198
Joined: Thu Nov 12, 2015 3:47 pm

Re: Nox Script 3.0 and NoxTools on GitHub

Postby panic » Tue Aug 23, 2016 1:47 pm

why happen goto error?

you try copy to below code and paste any code.
and compile... then display compile error 'Error: Parse error. Check your source again.'

Code: Select all
int getPlayer() {
    int var_0 = 0;
    if (CurrentHealth(self) > 0) {
        if (check == true) {
            while(var_0 < 10) {
                if (GetCaller() == player[var_0]) { //bug_code
                    goto l1;
                }
                var_0 += 1;
            }
            var_0 = 0;
            while(var_0 < 10) {
                if (MaxHealth(player[var_0]) == 0) {
                    player[var_0] = GetCaller();
                    player[var_0 + 10] = 1;
                    PrintToAll(" * player" + IntToString(var_0 + 1) + "has joined the game .");
                    goto l1;
                }
                var_0 += 1;
            }
            MoveObject(self, 3918.0, 3388.0);
            Enchant(self, "ENCHANT_FREEZE", 0.0);
            Enchant(self, "ENCHANT_ANTI_MAGIC", 0.0);
            PrintToAll("Noxworld.c:ErrFull");
        }
        else {
            PrintToAll(" * custom patch file is fail to loading ....");
            PrintToAll(" * you can download here: http://blog.daum.net/ky10613/178");
            MoveObject(self, 3918.0, 3388.0);
            Frozen(self, 1);
        }
    }
    l1:
    return 0;
}
Attachments
goto_bug2.jpg
remove goto then good well.
goto_bug2.jpg (192.65 KiB) Viewed 1069 times
goto_bug1.jpg
goto syntax compile error - why?
goto_bug1.jpg (160.14 KiB) Viewed 1069 times
panic
Adept
Posts: 198
Joined: Thu Nov 12, 2015 3:47 pm

Re: Nox Script 3.0 and NoxTools on GitHub

Postby zoaedk » Sat Aug 27, 2016 11:45 pm

The latest releases of the NoxScript tools are up: VSCode extension and Map Editor. Besides lots of bugs fixes from the first release, it now includes a script decompiler. While the script decompiler works pretty well on official maps, it may or may not work as well on custom maps.

Another change is that the compiler and decompiler supports an ignore object type flag. This can be used for compatibility with custom scripts that relied on using waypoint IDs. If you are writing a new script, you can enable this flag by prepending:
Code: Select all
//@ignore_object_type


If you are decompiling a custom map, you must run the decompiler manually in order to enable this flag:
Code: Select all
extract-scripts.exe -o custom.obj custom.map
nsdc.exe --no-object-type -o custom.ns custom.obj


Also, pre-decompiled scripts from the official maps: http://server1.awesie.org/scripts.zip.
zoaedk
Global Moderator
Global Moderator
Posts: 42
Joined: Sat Jul 04, 2015 12:09 pm
Location: Austin, TX, USA

Re: Nox Script 3.0 and NoxTools on GitHub

Postby panic » Mon Aug 29, 2016 1:26 pm

hey script 3.0 version 6 Bug...

self and other value is change to each other.

current value(bug)
self = -2
other = -1

origin
self = -1
other = -2

test code ...
Code: Select all
void loadFunction() {
    PrintToAll(" *self value: " + IntToString(self));
    PrintToAll(" *other value: " + IntToString(other));
}
Attachments
1608292025.jpg
1608292025.jpg (174.11 KiB) Viewed 1020 times
panic
Adept
Posts: 198
Joined: Thu Nov 12, 2015 3:47 pm

Re: Nox Script 3.0 and NoxTools on GitHub

Postby zoaedk » Mon Aug 29, 2016 8:08 pm

Sorry, I completely forgot to mention that change. Based on the decompilation of the Nox official maps, it looked like the old releases of Nox Script 3.0 had them backwards. The latest version should have them correct now. Do you think the previous way was better?

Sorry if this forces you to change some scripts. Since it is still early, I wanted to fix this now.

Looking at the decompiled code for Wiz09d.map:
Code: Select all
void Patrol()
{
    Wander(self);
    return;
}

Code: Select all
void HuntPlayer()
{
    CreatureHunt(self);
    return;
}

Code: Select all
void HomePatrol()
{
    AggressionLevel(self, 0.8299999833106995);
    GoBackHome(self);
    PauseObject(self, 120);
    Wander(self);
    return;
}


From Wiz01A (this one I think is the clearest example: when somebody steps on the trigger, call ObjectOff on the trigger, which should be self since Trigger is the one calling the function):
Code: Select all
void OpenSecretWalls()
{
    ObjectOff(self);
    WallGroupOpen(gvar44);
    return;
}


So, if you are using the latest VSCode extension the below should print out as:
Code: Select all
    PrintToAll("self: " + IntToString(self));
    PrintToAll("other: " + IntToString(other));

Code: Select all
self: -2
other: -1
zoaedk
Global Moderator
Global Moderator
Posts: 42
Joined: Sat Jul 04, 2015 12:09 pm
Location: Austin, TX, USA

Re: Nox Script 3.0 and NoxTools on GitHub

Postby panic » Wed Sep 14, 2016 3:43 pm

hey, how to use code 'CreateMover' ...?

it code can spawn 'mover' and i sure it for examine.

however,...this mover can't moving object...
how to moving object with mover created by this code.?

i need additional explanation.

please help me...
Attachments
1609150018.jpg
but, extent number is not thing..
1609150018.jpg (314.3 KiB) Viewed 966 times
1609142259.jpg
1609142259.jpg (58.55 KiB) Viewed 967 times
panic
Adept
Posts: 198
Joined: Thu Nov 12, 2015 3:47 pm

Re: Nox Script 3.0 and NoxTools on GitHub

Postby zoaedk » Thu Sep 15, 2016 7:38 am

After looking at it in IDA some more, I agree that CreateMover will probably not work without a patch. The code in MoverUpdate is buggy.
zoaedk
Global Moderator
Global Moderator
Posts: 42
Joined: Sat Jul 04, 2015 12:09 pm
Location: Austin, TX, USA

PreviousNext

Return to Modding & Mapping

Who is online

Users browsing this forum: No registered users and 1 guest

cron