Jump to content

Recommended Posts

Posted (edited)

I think there is no point to be so pathetic. I'm trying to help you to complete this big work finally, since you've made it public, and probably you want it to be as much usable as it could be.

 

Have to remove your smile mod, since it's done for all cases, instead of doing it properly, where it's needed. But let's skip it finally.

 

I don't know which diff you are using, and don't want to know, but it's obvious that this diff is not right.

 

Ors are missed in about 20 classes (corpse_of_kurtz 1 of them)

 

image.thumb.png.d766045fc82ba21a21591c0da2396e37.png

 

More complicated case fairy_mymyu

image.thumb.png.0cf4bb1a4cba64aec10871763cbe01b0.png

 

image.thumb.png.2ab4c73e7de97d043718ba6eaa60b5ae.png

Empty parameers here and in quest_0503_imperial_gravekeeper , rodd

 

image.thumb.png.095b382c5c26269ccf994009b36f7de3.png

class party_leader_ag_casting_curse : party_leader_casting_curse

parameter_define_begin

parameter_define_end

 

 

Edited by MasterToma
Posted (edited)

Const pushing looks like in wrong place (tor)

image.thumb.png.41e926900d1e38d167215ed89fd40f04.png

 

tutorial_quest_npc

original:

	push_const 4194304
	push_const 2097152
	bit_or
	push_const 8388608
	bit_or
	not
	bit_and
	assign

recompiled

	push_const 4194304
	not
    bit_and
	push_const 2097152
	bit_or
	push_const 8388608
	bit_or
	assign

 

Edited by MasterToma
Posted

Great!

 

1. I've decompiled C1 ai.obj from leaked CHN server using @verbrannt's decompiler (branch c1-support)

2. Compiled back ai.nasc without any changes, using my C1 AI compiler

3. Splited compiled AI classes from original ai.obj and recompiled ai_decompiled.obj in separate files

4. Compared 2 directories (with ignore L\d* and fetch_i\s*//\s*(npc_)class_id

 

Here is result https://ibb.co/jSNsBy

 

Original obj code

1. extra jump is present in 10 files. This jump jumps to next line, so it's completely useless. Don't know, why compiler generates it

2. empty parameters in 4 classes (selected ones on picture) are present in original obj and missed after recompilation. This also could be ignored

class party_leader_ag_casting_curse : party_leader_casting_curse
parameter_define_begin
parameter_define_end
...

 

So, I could say, it's first decompiler for ai.obj, which works (I mean it) at least for C1. But in general, code syntax wasn't changed much in NAS language (I've checked compiler from C4 - only diagnostics were improved and few minor generator changes, but lexer/parser are the same).

 

 

 

Posted (edited)

I would like to request minor (is it?) improvement.

 

There are a lot of cases, where strings are present inside decompiled NAS file. E.g.

	TelPosList Position = {
		{"古鲁丁城镇"; -80749; 149834; -3043; 18000; 0}
	};

But actually, there should be ID from fstring.txt file. Originally, NAS Lexer translates ID from fstring.txt for TelPosList, and Code-Generator inserts string in ai.obj

 

So, this should be like this

	TelPosList Position = {
		{1000003; -80749; 149834; -3043; 18000; 0}
	};

It allowed NCSoft to do script language-agnostic.

 

Similar for AddChoise, but case is more complicated there, since it requires QuestDataChecker.exe

 

Edited by MasterToma
Posted (edited)
9 hours ago, MasterToma said:

I would like to request minor (is it?) improvement.

 

There are a lot of cases, where strings are present inside decompiled NAS file. E.g.


	TelPosList Position = {
		{"古鲁丁城镇"; -80749; 149834; -3043; 18000; 0}
	};

But actually, there should be ID from fstring.txt file. Originally, NAS Lexer translates ID from fstring.txt for TelPosList, and Code-Generator inserts string in ai.obj

 

So, this should be like this


	TelPosList Position = {
		{1000003; -80749; 149834; -3043; 18000; 0}
	};

It allowed NCSoft to do script language-agnostic.

 

Similar for AddChoise, but case is more complicated there, since it requires QuestDataChecker.exe

 

I've added issue for this. Result should have comment with original string like this:

 

{1000003; -80749; 149834; 0} // 1000003 - 古鲁丁城镇

Edited by verbrannt
Posted (edited)

New release: https://github.com/madyanov/nasc-decompiler/releases/tag/v1.5

 

  • Fixed broken precedence & associativity (thx @master-toma for feedback)
  • Recompiled AI now almost the same as original AI (at least C1, thx @master-toma for feedback)
  • GF AI now decompiles without errors (no ignored classes)
  • C1 datapack by @master-toma
  • GD datapack updates by @ChaosPaladin
  • Datapack format changes (enums.json -> pch.json, manual_pch.txt now parsed automatically)
  • AI chronicles now detected automatically
  • Added --output, --ignore & --config options
  • --chronicle option renamed to --chronicles

 

Decompiled AI examples: MEGA
Your feedback & PRs are welcome.

Edited by verbrannt
Posted
46 minutes ago, zconll said:

Thanks you for the new update, for c1 support we have download c1-support  branch from repository?

 

Yeah, wrong release title :) C1 support now only in c1-support branch.

Posted

Thank you, I see on decompiled code something weird, i use options "--chronicles=c1 --tree=0 --utf16le=1", as can you see show some KR/JP string on beginning all classes after "default_npc" class. This don't happen if use default encoded utf8 " --utf16le=0".

Quote

class default_npc {
parameter:
    int DesirePqSize = 50;
    int FavorListSize = 30;
    float IdleDesire_DecayRatio = 0.0;
    float MoveAround_DecayRatio = 0.0;
    float DoNothing_DecayRatio = 0.0;
    float Attack_DecayRatio = 0.0;
    float Chase_DecayRatio = 0.0;
    float Flee_DecayRatio = 0.0;
    float GetItem_DecayRatio = 0.0;
    float Follow_DecayRatio = 0.0;
    float Decaying_DecayRatio = 0.0;
    float MoveToWayPoint_DecayRatio = 0.0;
    float UseSkill_DecayRatio = 0.0;
    float MoveTo_DecayRatio = 0.0;
    float EffectAction_DecayRatio = 0.0;
    float IdleDesire_BoostValue = 0.0;
    float MoveAround_BoostValue = 0.0;
    float DoNothing_BoostValue = 0.0;
    float Attack_BoostValue = 0.0;
    float Chase_BoostValue = 0.0;
    float Flee_BoostValue = 0.0;
    float GetItem_BoostValue = 0.0;
    float Follow_BoostValue = 0.0;
    float Decaying_BoostValue = 0.0;
    float MoveToWayPoint_BoostValue = 0.0;
    float UseSkill_BoostValue = 0.0;
    float MoveTo_BoostValue = 0.0;
    float EffectAction_BoostValue = 0.0;
    
handler:
    EventHandler NO_DESIRE() {
    }

    EventHandler TALK_SELECTED(talker) {
        ShowPage(talker, "noquest.htm");
    }
}
挊氀愀猀猀 挀椀琀椀稀攀渀 㨀 搀攀昀愀甀氀琀开渀瀀挀 笀਀瀀愀爀愀洀攀琀攀爀㨀਀ऀ猀琀爀椀渀最 昀渀䠀椀 㴀 ∀挀栀椀⸀栀琀洀∀㬀਀ऀ਀栀愀渀搀氀攀爀㨀਀ऀ䔀瘀攀渀琀䠀愀渀搀氀攀爀 吀䄀䰀䬀䔀䐀⠀琀愀氀欀攀爀⤀ 笀਀ऀऀ匀栀漀眀倀愀最攀⠀琀愀氀欀攀爀Ⰰ 昀渀䠀椀⤀㬀਀ऀ紀਀紀਀਀class ticket_inspector : citizen {
}
挊氀愀猀猀 渀瀀挀开攀氀搀攀爀 㨀 挀椀琀椀稀攀渀 笀਀紀਀਀class ruler : citizen {
}

 

Posted
12 minutes ago, zconll said:

Thank you, I see on decompiled code something weird, i use options "--chronicles=c1 --tree=0 --utf16le=1", as can you see show some KR/JP string on beginning all classes after "default_npc" class. This don't happen if use default encoded utf8 " --utf16le=0".

 

Fixed.

Posted (edited)
On 7/18/2018 at 3:12 PM, MasterToma said:

I would like to request minor (is it?) improvement.

 

There are a lot of cases, where strings are present inside decompiled NAS file. E.g.


	TelPosList Position = {
		{"古鲁丁城镇"; -80749; 149834; -3043; 18000; 0}
	};

But actually, there should be ID from fstring.txt file. Originally, NAS Lexer translates ID from fstring.txt for TelPosList, and Code-Generator inserts string in ai.obj

 

So, this should be like this


	TelPosList Position = {
		{1000003; -80749; 149834; -3043; 18000; 0}
	};

It allowed NCSoft to do script language-agnostic.

 

Similar for AddChoise, but case is more complicated there, since it requires QuestDataChecker.exe

 

 

After I've impletented this, I found, that compiler (GF by @eressea) doesn't work properly with {int, int, int, int} syntax of TelPosList property.
I've got many errors during compilation:
 

[d:\vss\globalbranch\work\overseas\ct2_final_0109\program\server\l2npc\fstring.h][112] Can't allocate buffer for fstring


Compiler allocates buffer only for first 38 strings, any next string in OBJ file is empty.
NASC that I'm trying to compile: https://mega.nz/#!WeA1WQKQ!2UxWCjQ8x6Y1IBFlJ7nvj8oIYQM6tKyESGleUmaOPhs

 

 

Edited by verbrannt
Posted
14 hours ago, verbrannt said:

 

After I've impletented this, I found, that compiler (GF by @eressea) doesn't work properly with {int, int, int, int} syntax of TelPosList property.
I've got many errors during compilation:
 


[d:\vss\globalbranch\work\overseas\ct2_final_0109\program\server\l2npc\fstring.h][112] Can't allocate buffer for fstring


Compiler allocates buffer only for first 38 strings, any next string in OBJ file is empty.
NASC that I'm trying to compile: https://mega.nz/#!WeA1WQKQ!2UxWCjQ8x6Y1IBFlJ7nvj8oIYQM6tKyESGleUmaOPhs

 

 

 

Fixed - download http://download.l2shrine.com/MyExt64.dll

I'm getting errors about undefined variable talker - it's missing in handler arguments so compiler doesn't see it - first error I get for your AI is

07/22/2018 12:07:04.931, ERROR(780692) : Undeclared variable [talker]

Can you fix it somehow? :)
 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • Posts

    • https://l2goldcustom.online/
    • do u have the full source code for it  coz the one i have does not have code to read ukx files
    • 🎨 Design & edit without limits: Canva Pro & CapCut Pro subscriptions restocked and active with instant automated delivery!     FINAL CALL: Google is Shutting This Down After October 2026! Google will NEVER bring back this window of opportunity again. Once this month ends, this massive backdoor upgrade is gone permanently!  BUY 2, GET 1 FREE IS STILL LIVE! Stock up now for yourself, your family, your business, and your friends! Think about it: Every single person you know uses a Gmail account, and everyone is running out of storage. Don't let your loved ones get trapped paying $20–$30 every single month when you can set them up with 5TB Cloud Storage + Gemini Advanced (12–18 Months) right now for only $15! Why Buy Bulk Activations Today? Instant Gift Value: Perfect lifetime-style gift for clients, family, or team members. 100% Private & Safe: Activates on personal Gmails—zero passwords or logins required. Global Access: Works worldwide with zero VPN hassles. Instant Automated Delivery: Receive your activation links in seconds 24/7! ‍ Time is running out fast—secure your extra free licenses before the October deadline hits! Order Your Bundle Now on the Website
    • VAELOR Lineage II Interlude · L2OFF · x12   OPEN BETA 9 October 2026 · 17:00 UTC   GRAND OPENING 23 October 2026 · 17:00 UTC   Website: https://l2vaelor.com/ Discord: https://discord.gg/qMgPxH2fd4   ━━━━━━━━━━━━━━━━━━━━━━   WHAT VAELOR AIMS TO BE   Vaelor is an international L2OFF Interlude x12 server built to preserve the original Interlude experience. Combat, classes, crafting, sieges, Olympiad and progression remain close to retail. The changes are limited to the pace and convenience features that make sense on an x12 server.   RATES   EXP and SP: x12 Party EXP and SP: x13.2 Adena: x10 Drop: x5 Spoil: x9 Quest EXP and SP: x3 Quest Adena: x3 Raid Boss Drop: x3   SERVER INFORMATION   Server location: France Main language: English Level cap: 80 Safe enchant: +3, or +4 for full body armor Maximum enchant: +16 Enchant through +15: 70% physical weapons, 40% magic weapons, 66% armor Final step to +16: 35% physical weapons, 20% magic weapons, 66% armor Buff slots: 20 First and second class changes: free Third class change: original quest Game windows: 3   GAMEPLAY   No auto-farm or custom equipment. Level-scaled buffer with presets, custom schemes and support for both players and pets. The available buffs are gradually reduced as the character levels, helping early progression without replacing support classes later in the game. The Global Gatekeeper only connects towns and villages. Travel is free below level 40, then uses level-based Adena fees, with half-price travel between 18:00 and 06:00 UTC. There are no direct teleports to farming zones. The Alt+B Market is a centralized convenience shop containing only consumables and utility items already sold without limits by regular town merchants. Its prices are deliberately higher, so visiting the original NPC merchants remains the economical choice. It does not sell equipment, crafting materials, enchant scrolls or Life Stones. Drop Search finds either an item or a monster and shows where items drop or can be spoiled, including the server rates and the viewing character's level penalty. Player Shop Search and Offline Shop make it easier to find and trade with actual player-run stores while keeping the economy in players' hands. Offline shops remain active for up to 48 hours. Rankings and live Raid Boss and Grand Boss status are available through Alt+B. Character PIN and Computer Lock provide additional account and character protection. Restored and corrected Interlude content includes the Frozen Labyrinth and Ice Queen quest chain, Primeval Isle and Sailren, Wild Beast Reserve, Rainbow Springs Hall, Pagan Temple, and quests around Pavel Ruins and the Plunderous Plains. Auto learn and auto loot are enabled. Castle sieges every two weeks Olympiad daily from 18:00 to 00:00 UTC   PREMIUM AND STORE   Premium grants +15% EXP and SP, +5% Adena, Drop and Spoil, one additional game window and convenience features. The store is limited to Premium, cosmetic accessories and character services. Equipment, enchants, combat stats and access to content are not sold.   ━━━━━━━━━━━━━━━━━━━━━━   If you know Interlude well, come test the server and tell us honestly what feels wrong.   Create account: https://l2vaelor.com/register Download: https://l2vaelor.com/#download Discord: https://discord.gg/qMgPxH2fd4
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..