Jump to content

Recommended Posts

Posted

I have an idea - prepare everything to send the message as normally from client and just before sending it cancel friendship on second window

Posted (edited)

in gf i think is function to chechk friends. as i know in c4 such function exists

in c1 this function not exist

so i am checking by sending friend request before, if friend already - server sends message about "fiends already"

if so - friend say allowed. if no such message - cheater detected :) no friend say message sended, cheating logged

Edited by smeli
  • 2 weeks later...
Posted (edited)

Do you have a way of automating the creation of classes.txt file for split AI? Or do you just add all file names and rearrange them by hand?

 

I have a python script that joins nasc files into one big nasc file, runs compiler on it and then splits it again to individual classes and generates classes.txt file

 

http://download.l2shrine.com/makeai/ai.tar.gz

Edited by eressea
Posted

I have a python script that joins nasc files into one big nasc file, runs compiler on it and then splits it again to individual classes and generates classes.txt file

 

http://download.l2shrine.com/makeai/ai.tar.gz

 

Thank you, I'm really curious about customizing the nasc files. I'm still quite confused on how the whole AI.obj/nasc thing works. Where do the nasc files come from? When I split my ai.obj, I get a bunch of txt files in one folder.

Looking through your uploaded example, you've got all the files as nasc and a file structure that's easier to work with. How? Am I missing a tool that converts ai.obj to nasc files?

 

I've read the AI GF documentation available on this forum, and I'm able to edit and add npcs of my own. I'm still learning, thanks for your help.

Posted

Whole l2npc.exe is just a huge virtual machine running ai.obj.

 

Txt files (or ai.obj) = compiled AI

NASC files = AI sources

 

There are few "decompilers" that can convert compiled AI back to source (usually with few errors that must be fixed manually)

 

If you really want to do anything bigger with AI, you should start from sources. Editing ai.obj code is pain in the ass and also it usually prevents "decompilation" (decompilers don't use any real heuristic to analyze the code, they just know some patterns and know how to convert them back to NASC code, so if you do some manual changes in obj, decompiler probably won't be able to decompile it)

Posted (edited)

So I've been looking into the NASC files to see if I can understand their structure - and I'm honestly more inclined to work with the compiled AI (split txt) files. Is there any reason I shouldn't do this?

 

I think partly the reason I'm leaning towards the compiled ai, is because of the available documentation that explains it pretty well. Is there any information like this for the NASC files?

 

Also, when I use the splitAI method, some of the paths/names of the files exceed the windows limit. Do you think you can add the path to the ai folder as an option in the .ini file?

Edited by L2Homage
Posted

So I've been looking into the NASC files to see if I can understand their structure - and I'm honestly more inclined to work with the compiled AI (split txt) files. Is there any reason I shouldn't do this?

 

I think partly the reason I'm leaning towards the compiled ai, is because of the available documentation that explains it pretty well. Is there any information like this for the NASC files?

 

Also, when I use the splitAI method, some of the paths/names of the files exceed the windows limit. Do you think you can add the path to the ai folder as an option in the .ini file?

 

That documentation can be used for NASC as well. It's generally bad idea to edit compiled OBJ code, it's much harder to write it in OBJ code and the NASC code is really much easier to understand.

 

Just compare this:

handler 4 13	//  TALK_SELECTED
	variable_begin
		"talker"
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	push_event	//  myself
	push_const 784			//ShowPage
	add
	fetch_i			//ShowPage
	push_event	//  talker
	push_const 40			//talker
	add
	fetch_i
S1. "noquest.htm"
	push_string S1
	func_call 235012165	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
handler_end

and

	EventHandler TALK_SELECTED(talker)
	{
		ShowPage(talker, "noquest.htm");
	}

It's obvious that you'll make fewer mistakes in NASC. Also NCsoft wrote all the AI code in NASC (the compiler we're using is done by NCsoft itself). It's the same as if you asked me whether it's better to do something in C++ sources or in compiled EXE file. Both is possible but the latter one is much much harder.

Posted

That documentation can be used for NASC as well. It's generally bad idea to edit compiled OBJ code, it's much harder to write it in OBJ code and the NASC code is really much easier to understand.

 

Just compare this:

handler 4 13	//  TALK_SELECTED
	variable_begin
		"talker"
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	push_event	//  myself
	push_const 784			//ShowPage
	add
	fetch_i			//ShowPage
	push_event	//  talker
	push_const 40			//talker
	add
	fetch_i
S1. "noquest.htm"
	push_string S1
	func_call 235012165	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
handler_end

and

	EventHandler TALK_SELECTED(talker)
	{
		ShowPage(talker, "noquest.htm");
	}

It's obvious that you'll make fewer mistakes in NASC. Also NCsoft wrote all the AI code in NASC (the compiler we're using is done by NCsoft itself). It's the same as if you asked me whether it's better to do something in C++ sources or in compiled EXE file. Both is possible but the latter one is much much harder.

 

I see, thanks. I'll do my best with understanding the NASC files, it's obviously the better choice.

  • 2 months later...
Posted
2 hours ago, lordeze said:

any mini guide how to compile with VS2005x64?
or any files already compiled?

Install Visual Studio, open solution, select release & x64 and compile :)

Or you may use precompiled MyExt64.dll that's in server/ directory

Posted
On 30/9/2017 at 6:27 AM, eressea said:

Install Visual Studio, open solution, select release & x64 and compile :)

Or you may use precompiled MyExt64.dll that's in server/ directory

I keep insisting without result :C

server port.jpg

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...