Jump to content

Ai Parser : Increase Quest Items Drop Rate


Recommended Posts

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

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

Link to comment
Share on other sites

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

 

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

Link to comment
Share on other sites

  • 4 weeks later...

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+)

Link to comment
Share on other sites

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

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 :)

Link to comment
Share on other sites

  • 4 months later...

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

Edited by bionicle
Link to comment
Share on other sites

  • 1 year later...

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

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

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

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

Link to comment
Share on other sites

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

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


  • Posts

    • L2 Insignia High Five 20x MID SERVER FOCUSED ON OLYMPIAD | PVP | AUTOFARM       OPEN BETA TEST SERVER 3 MAY 2024   GRAND OPENING 10 MAY 2024    Rates: 📜 XP/SP 20x | Spoil 15x | Drop 10x | Adena 10x 📜     Server Features: 🔥 No Olf-T Shirt, No big over-enchant, No over-power Donate 🔥 🔥 VIP Gold Color Chat, Unique Olympiad Extra Points Engine, GvG Event 🔥 🔥 Auto-Farm, LoA and DV scheduled PvP Zone, Calendar Daily Reward 🔥 🔥 Castle Instance, Solo Instance, PvP Solo Rift, Dress me system, Adena Boxes 🔥        Website: https://www.l2insignia.com  Discord: https://discord.com/invite/yEgsrHn2hQ      
    • I am selling the essence project which includes versions 388 and 439 that have been running for over 2 years or (447 as custom PVP like Pride). I have a test server for you to test them out. If you are really interested in it then contact my seller at discord: kiwi7106. Price: 4000 Euro P/s: This is a project that I have spent a lot of money and time developing, so if you are not interested in it, please get out of this topic, thank you. P/s 2: If you find the price too expensive, it's best to skip this article and find another project and don't comment negatively on my topic, thank you.
    • Someone ask me for this, it should work on any client that has Kamael race, preview:     Installation - there are two ways to install depending on how you want to use it:   Method 1: If you want to completely replace the original, do:   Copy all lines from your armorgrp to Notepad++, press Ctrl+H, check the "match whole word" option and replace:   kamael.Mkamael_m000_w_ad00   by:   AvengersKamaelWings.Avengers_MKamael_m001_w_ad00   Then replace:   MKamael.Mkamael_m000_t00_w   by:   AvengersKamaelWings.MKamael_m001_t00_w   Now repeat the same process with the female, replace:   kamael.Fkamael_m000_w_ad00   by:   AvengersKamaelWings.Avengers_FKamael_m001_w_ad00   Then replace:   FKamael.Fkamael_m000_t00_w   by:   AvengersKamaelWings.FKamael_m001_t00_w   You're done, paste everything back into File Edit and save!   Method 2: If you only want to replace in specific sets, execute the above process only on the armorgrp of those sets.   Repack by: AvengersTeamBr Password: LadrãoDeFrango      
  • Topics

×
×
  • Create New...