Jump to content

Recommended Posts

Posted (edited)

Hello many of us have a L2 project with custom rates , currently we count with tools to increase exp , drop , quest reward ,but not for quest item drop rate itself this means more than the 60% of quest are unusefull for players because in fact the chance to get quest item is X1 but rest of rates can be increased so player will get level and items by farming before he could end quest

 

So im creating a tool that parshe AI and increase quest item drop chance .

 

Features:

Can change drop rates of all quest or specified ones.

You can see a list with current quest and their drop items rates.

Edit when you want any drop item chance or reset to its original state

Edited by madocter
Posted

Sounds good, specially if its tested and doesn't alter anything else

 

Thanks :)

 

Once we're done the parsher i will update this topic .

 

Problem atm is not program itself but find a good AI decompiler that can recompile entire ai files . maybe we will need l2gmpanel control of xel procedure

Posted (edited)
For our NPC Manager we use LightMare's decompiler and then AdvExt's Interlude compiler.

I think the compiler was $80 or something but was worth every penny.

 

LM's decompiler lets you send it data though stdin and then responds through stdout which is much faster and less IO than writing / reading files.

Thanks LM!

Output is always on the standard channel though, errors aren't sent to stderror unfortunately.

You have to detect and process them as they happen. This should be rare though.

 

Once you have the entire file decompiled and each class separated, iterate over each one and make whatever modifications required.

 

AdvExt's compiler can compile multiple classes provided you have made the changes described in the included ReadMe.

- Remove the gg:: prefix on global calls. gg::Rand() becomes just Rand()

- Remove the :: postfix to myself and replace with dot. AKA - myself::Say becomes myself.Say()

- Switch statements become select statements (literally just change the keyword switch to select).

- Include the correct preprocessor header one line above each class (see ReadMe).

- Include all parent, grandparent, great grandparent etc classes all the way up until the root class for anything you compile.

- Always ensure everything written out (for both the compiler and then for use by NPCServer) is in grandparent > parent > child order.

 

Hope this helps, Looking forward to your tool!

Edited by tk422
Posted

 

For our NPC Manager we use LightMare's decompiler and then AdvExt's Interlude compiler.
I think the compiler was $80 or something but was worth every penny.
 
LM's decompiler lets you send it data though stdin and then responds through stdout which is much faster and less IO than writing / reading files.
Thanks LM!
Output is always on the standard channel though, errors aren't sent to stderror unfortunately.
You have to detect and process them as they happen. This should be rare though.
 
Once you have the entire file decompiled and each class separated, iterate over each one and make whatever modifications required.
 
AdvExt's compiler can compile multiple classes provided you have made the changes described in the included ReadMe.
- Remove the gg:: prefix on global calls. gg::Rand() becomes just Rand()
- Remove the :: postfix to myself and replace with dot. AKA - myself::Say becomes myself.Say()
- Switch statements become select statements (literally just change the keyword switch to select).
- Include the correct preprocessor header one line above each class (see ReadMe).
- Include all parent, grandparent, great grandparent etc classes all the way up until the root class for anything you compile.
- Always ensure everything written out (for both the compiler and then for use by NPCServer) is in grandparent > parent > child order.
 
Hope this helps, Looking forward to your tool!

 

It will be a lot of work. Working my self on such a tool... but problem is for multiple quest on same AI class with different item drops and different chance  to sort and extract the exact rand(). 

  • 4 weeks later...
Posted

just do it ncsof way and all will be easy

ncsof ai system contains 3 files: ai_script.txt, macro.txt, questdata.txt

all quest rates edited in questdata only single time for 1 quest

after is running aimerger which inserts quests to required classes defined in questdata

processes macro definitions and creates ai_merged.txt file whis now is compiled by actual compiler

 

those commercial dumies does not care about ncsoft way, they working with merged file only

ncsoft way of ai editing is presented in C1 server pack shared by me (not suitable for c4+)

Posted (edited)

just do it ncsof way and all will be easy

ncsof ai system contains 3 files: ai_script.txt, macro.txt, questdata.txt

all quest rates edited in questdata only single time for 1 quest

after is running aimerger which inserts quests to required classes defined in questdata

processes macro definitions and creates ai_merged.txt file whis now is compiled by actual compiler

 

those commercial dumies does not care about ncsoft way, they working with merged file only

ncsoft way of ai editing is presented in C1 server pack shared by me (not suitable for c4+)

to bad that is not for c4 too the old way :)

Edited by xeL
Posted

to bad that is not for c4 too the old way :)

 

not old way, just new ncsoft compilers not leaked 

and this old one even older than c1, it not suted even for c1, but modified by russians to suit c1

in master hands it will start work for any chronicles :)

  • 4 months later...
Posted (edited)

ohhhh please reshare maaaaaan =) I want it, want want want, want change ALL quest rates. - ЗИЙЧАС Я БУДУ МИНЯТЬ УСЕ КВЕСТОВИЕ РЕЙТЫ xD

Edited by bionicle
  • 1 year later...
Posted (edited)

Well some help with compilers / decompilers would be apreciated since :

 

smeli AI kit : do not works

  \AI KIT\4_Compiler_C4_sauron  = NASC.exe process stop

xel  GMpanel  (\base\bin) : do not works

   \Compiler_C4_sauron  =  Error opening fileCompiling...

 

Edited by madocter
Posted (edited)
13 hours ago, smeli said:

ai_macro.txt

:)

 

Well i managed to get working lightmare C4 decompiler the AI.obj source has to be on ANSII thats why it didn't work. In fact i did a little version of the program and its working problem i see is that AI.OBJ do not follow any solid pattern for example for quest random chance there is at least 3 kinds of GG:Rand function usage on different way , thats okey program can manage , but for example i found some extrange npc that besides they drop more than one item for more than one quest they have a lot of GG:Rand functions , not related to quest chance iteself but for calculate other things. So in brief , i can't find any solid pattern to dissociate GG:Rand functions related to quest chance from GG:Rand related to other things.

One quick fix can be :  if before find GG:Rand patern , i do not find myself::GiveItem1( *****, @  (aparently the @ seems to be parameter for quest item)  then ignore and dont replace for GG:Rand (parameter, parameter)

 

Edited by madocter
Posted (edited)

If someone want participate here is the first test i did :

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package WEREMADS;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.JFileChooser;

/**
 *
 * @author K5
 */
public class PARSE_AI {
        
    public String nasc_line ="";
    
    String quest = "myself::HaveMemo( c1, @quest_name )" ; // 873
    String quest_2 = "myself::HaveMemo( c1, @quest_name )"; //79
    
    String quest_3= "myself::HaveMemo( target, @quest_name )"; //145 count
    
    String quest_4 = "myself::HaveMemo( c1, quest_id )";  //188
    String quest_5 = "myself::HaveMemo( c0, quest_id )"; //161
    
    String quest_6 = "myself::HaveMemo( c2, @quest_name)"; //22
    String quest_7 = "myself::HaveMemo( c2, quest_id)"; //10
    

  
}

 

 

And  an example of the output:  look at $PARAMETER_1 , and $PARAMETER_2  this is what will be replaced (Note : test atm just look for 1 kind of GG:Rand and is not finished

    code_info = random1_list::RandomSelectOne();
    if( gg::IsNull( code_info ) == 0 )
    {
      switch( code_info.code )
      {
        case 0:
        {
          myself::SetCurrentQuestID( @save_my_sister1 );
          target = code_info::RandomSelectOne();
          if( gg::IsNull( target ) == 0 &&
              myself::DistFromMe( target ) <= 1500 )
          {
            if( gg::Rand( $PARAMETER_1 == $PARAMETER_2 )
            {
              if( 1 )
              {
                target.quest_last_reward_time = myself::GetCurrentTick();
                myself::GiveItem1( target, @poison_sac, 1 );
                myself::SetFlagJournal( target, @save_my_sister1, 2 );
                myself::SoundEffect( target, "ItemSound.quest_middle" );
              }
            }
          }
          break;
        }
        case 3:
        {
          myself::SetCurrentQuestID( @ranchers_plea );
          target = code_info::RandomSelectOne();
          if( gg::IsNull( target ) == 0 &&
              myself::DistFromMe( target ) <= 1500 )
          {
            myself::GiveItem1( target, @giant_spider_skin, 1 );
            myself::SoundEffect( target, "ItemSound.quest_itemget" );
          }
          break;
        }
      }
    }

 

Pitty that sauron compiler give me error : unknown param WayPoints

DvZTMDq.jpg

 

So i dont know what i will do once i finish the program and if works , probably im doing something wrong ?  i tried get help form XEL since he created GMpanel that uses compiler/decompiler he told me that he do not have time to help and dont remember how he used compiler so i request him GMpanel source , or at least the part where the program uses the compiler  but he denied and he say that he ofuscated the code of his app xD !! and is private mega-secret work ... MCX level ... just a C# windows form application

 

Edited by madocter
Posted

Cool , aparently program really works how expected without extrange issues . currently changed 138  quest drop item chances  , now need check other GG:Rand patterns  ,  then i guess i can make it work by a list of target quests that user want change , and support to other chronicles.

 

Still with error when use compiler

Posted

report :

AMOUNT OF QUESTS : 305
AMOUNT OF NPCS : 6646
MODIFIED DROPS :1238  OF 808 NPCS   (21% of NPCS  DROP AT LEAST 1,5 QUEST ITEM)

#

QUEST DROP RANDOM PATERN FOUNDS :1479
MODIFIED : 1238
NASC CLASES MODIFIED :808

I do not check not common paterns like : <=  ,  >=  ,  >   . Also all of them just sum a total of 100 coincidences vs the sum of the most common ones : 1479

IGNORED DROP PATERNS : 80-100

POSIBLE FATAL ERRORS : 1

 

I think program is finished , just need be able to compile again and test  if : 1- npc do not crash , if does find wrong line , 2- npc behavior correctly , 3-not any warning on console , 4- check behavior and code one by one the 808 modified clases

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...