Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Lineage 2 Server Modifications ONLY! (https://postpacific.mmorpg-game.online/forumdisplay.php?f=28)
-   -   [SHARE] NPCDATA Drop Quantities Editor (https://postpacific.mmorpg-game.online/showthread.php?t=6432)

khelben 16.12.2006 09:27

[SHARE] NPCDATA Drop Quantities Editor
 
I just finished writing this utility not to long ago, it's purpose is to increase the drop quantities of basic crafting components to allow a crafting community to actually exist.

The formulas the program uses are explained in the readme.

I have not tested this on a production server as I do not run one, but I have downloaded 2 different NPCDATA.TXT files that claim to be C4 official and the tool has performed flawlessly on them. This was written for the admins of a server I play on so that they could solve lack of materials issues on a 7x server.

A side note, this was written quick and dirty so if you try to break it, you probably will (i.e. by entering text instead of a number in the modification factor boxes).

The source code is included, which has the makings of a pretty decent NPC class in it.

This utility could do alot more if I have the time/motivation to update it.

The source code is included.
You do need .Net Framework 2.0

You are free to use/distribute/modify this program as long as the source code is included or made available on the same download page as the modified program.

Enjoy! Comments welcome!

****Updated****
-v0.5
Forced Program to use English (United States) Regional Settings.
This should clear miscellaneous reports of errors interpreting stings.
The problem is that .Net tries to use local settings and in some
areas ',' and '.' mean very different things.

-v0.4
Added Progress Bar
Added Multiply Formula

-v0.3
Added Ignore formula option.
Prevented input of text into Modification Factor boxes.
Increased error message verbosity to help end user check for properly formatted
NPCDATA. Error message should display the NPC where the error occurred.
Started come minor code cleanup & commenting.
Included EULA in package.

-v0.2
Fixed issue in normalize option that would allow a quantity of 0 to be written.

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
NPCData QE v0.5.zip — 96261 байт

l2serverfull 16.12.2006 11:10

is possible dell all Mats in npcdata ? ... help me

l2serverfull 16.12.2006 11:15

OMG thxxxx lot :D

khelben 16.12.2006 18:23

i did a bit more testing and found an issue w/ normailize option.

It was a logic error on my part, I guess not enough caffine while coding ;p

DevilsAssociate 16.12.2006 19:19

nice job
thanks for the share

Arcia 17.12.2006 16:15

Excellent! Thanks a lot.

Good work!

Genes2 17.12.2006 16:52

very good job .

khelben 17.12.2006 21:44

v0.3 Released

scrap512 17.12.2006 22:02

thank you very much !

Nasedo 21.12.2006 07:09

It creates a 2kb file, I changed NPCdata to text because it errors in ANSI what am I doing wrong?

HF 21.12.2006 09:10

Sorry, but last pack no good.
Components file in unknown regional code, and Main.vb empty 0 kb.

khelben 21.12.2006 21:58

Quote:

Originally Posted by Nasedo (Post 74603)
It creates a 2kb file, I changed NPCdata to text because it errors in ANSI what am I doing wrong?

Keep it unicode, no need to convert it.

Additionally, if that does not solve your issue examine the NPC that it spits out the error for. Chances are it's improperly formatted. TABS between values, not spaces.

khelben 21.12.2006 22:05

Quote:

Originally Posted by HF (Post 74609)
Sorry, but last pack no good.
Components file in unknown regional code, and Main.vb empty 0 kb.

main.vb is 0kb.
main.designer.vb has the code in it.

you must have edited the components file. it hasn't changed since v0.1 if you do edit it be sure to save it as unicode.

rodier 23.12.2006 06:14

Code:

hmm IM getting this errors.. tried all formulas.. my npcdata is c4 retail 1x
.. no tabs.. no spaces..  only 2kb file created..

btw this error only when its in default L2 format (larger filesize) ..
when I convert to smaller filesize (unicode to ansi ?? ) im getting no error but program freeze.


latest version work OK - Im glad to help you to find where was problems :-)

khelben 23.12.2006 06:35

Between [gremlin] and level=1, is that a space or a tab?

khelben 23.12.2006 06:52

I just tested the rar you posted and it processed fine.

Maybe you need to be more patient?

It did take almost a full 10 seconds on my Athlon FX 60 w/ 4 GB Ram....

All i did was extract your file, load it in and pick an output file and ran it w/ default settings.

Keep in mind that it is parsing through an 18 meg file.

khelben 23.12.2006 06:57

When the hour glass is there, it's working on your file.

I plan on adding a progress bar eventually, but I haven't had the time yet.

Maybe after the New Year

khelben 23.12.2006 17:12

Ok I worked w/ rodier a bit last night.

He's getting his error on 2 different boxes w/ different CPUs and Operating Systems.

However his language settings are not English - US, I have not tested this on anything other than English - US, but he was going to change the settings and reboot and get back to me on the results.

khelben 25.12.2006 13:06

Updated v0.4!
Merry Christmas!

Osito2Dancer 25.12.2006 14:12

Very good share, thanks for it. Its really good, but i think i found a bug: for anyone who used this, please check the "adquire_exp_rate" of the new NPCDATA.txt. I ran this program on the PP-IRC C4 Release, and got the adquire_exp_rate modified by this standard:

Original: adquire_exp_rate = xx.xx (for a lvl 1 gremlin, the 1ºst mob)
Parsed One: adquire_exp_rate = 2939 (the same mob, got the "." on "xx.xx" deleted)

I used "Multiply" option, but just tested it out with Default one. Be careful about this.

Atte

Oso

khelben 25.12.2006 22:21

Please post the original NPC data so i can test.

I tested several versions with the new multiply formula with no descrepancy.

Thanks.

khelben 26.12.2006 01:05

Quote:

Originally Posted by Osito2Dancer (Post 74941)
Very good share, thanks for it. Its really good, but i think i found a bug: for anyone who used this, please check the "adquire_exp_rate" of the new NPCDATA.txt. I ran this program on the PP-IRC C4 Release, and got the adquire_exp_rate modified by this standard:

Original: adquire_exp_rate = xx.xx (for a lvl 1 gremlin, the 1ºst mob)
Parsed One: adquire_exp_rate = 2939 (the same mob, got the "." on "xx.xx" deleted)

I used "Multiply" option, but just tested it out with Default one. Be careful about this.

Atte

Oso

Both you and Rodier seem to have an issue with the same value. I really think this might be a localization issue. In your country do they use . for a decimal point or , ?

Thanks.

khelben 26.12.2006 13:39

Ok, for those of you that are having trouble and you NPC data is good, it is your Regional Settings. If you set your Regional settings to English - US you should be fine.

I think I have fixed this in the next release, However I'm far to tired to publish it right now.

I'll post it later.

I'd really like someone that was having problems to message me though so it could be tested a bit further.

I did some testing myself with my regional settings set to places that do not use . to denote fractional numbers and I'm no longer getting errors, but I'd feel better about releasing if it actually field tests ok for someone.

-Thanks.

khelben 26.12.2006 19:11

Updated v0.5
Should fix errors caused by regional settings.

khelben 27.12.2006 22:10

So has anyone found this thing useful?

Can you think of any other features to add?

Please post feedback. Thanks!

DukeGr 28.12.2006 10:36

nice work khelben,i tried it out but unfortunately it bugged my npcdata.

it made all mobs do very high damage like 15000 damage and u couldnt kill them.

khelben 28.12.2006 12:07

Quote:

Originally Posted by DukeGr (Post 75087)
nice work khelben,i tried it out but unfortunately it bugged my npcdata.

it made all mobs do very high damage like 15000 damage and u couldnt kill them.

Thanks for the response.

A couple questions for you.

1. Were you using the latest version, v0.5?
2. What are your regional settings in windows?
3. If you change your regional settings to English - US do you still experience the issue?

rodier 29.12.2006 08:33

latest version v0.5 work perfect with regional english - cz settings :-)

HF 29.12.2006 08:45

Quote:

Originally Posted by khelben (Post 75098)
Thanks for the response.

A couple questions for you.

1. Were you using the latest version, v0.5?
2. What are your regional settings in windows?
3. If you change your regional settings to English - US do you still experience the issue?

World standart is "." for decimal point.

khelben 29.12.2006 08:50

Actually in some countries they use "," case in point, Greece and Czechoslovakia

Kenjiro 29.12.2006 09:08

It should not rely on functions using regional settings (most Delphi ones) or should replace ',' to '.' before string-to-float conversion.

P.S. We (in Poland) use , as decimal point.

HF 29.12.2006 09:08

Quote:

Originally Posted by khelben (Post 75161)
Actually in some countries they use "," case in point, Greece and Czechoslovakia

Russia use it too as default, but all code developers must use "." in regional settings. Or... you need made additional code for compatible. .NET support regional checking and converations.
Or easy - do replace "," to "." for drop before working.

khelben 29.12.2006 09:26

Yeah, .net by default uses the end users regional settings. I have never really made anything that was used internationally before so I did not know of this issue. The current v0.5 release uses .net to force US English settings within itself.

This appears to have taken care of the issues international "," users were having.

JamesDean 03.01.2007 05:32

Nice share! Thanks, our server really needed this.

khelben 03.01.2007 10:42

Quote:

Originally Posted by JamesDean (Post 75377)
Nice share! Thanks, our server really needed this.

Glad this could help!

Osito2Dancer 03.01.2007 21:03

All is now good. Thanks for the share, you deserve a A++ :3.

Oso


All times are GMT. The time now is 23:21.