Jump to content

Myext64 - My New Opensource Gracia Final/epilogue Extender


Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 months later...
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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now



×
×
  • Create New...