Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 09.08.2007, 17:38   #1
Kation
Архивный участник
 
Join Date: Oct 2006
Posts: 57
Default push_const converter

As good u know in c5 mobs id was changed, i made little tool to change that id in ai.obj, tool will make for u knew ai with changed push_const 10xxxxx (where 10xxxxx is npcid). I found 1 bad thing, in ai.obj is one more thing which uses push_const 10xxxxx format - fstrings, so u will need to marge your new ai with old and change ids of fstring manually or add new fstring ids to fstring.txt (i made tool for that too -fstring.pl). Tool is writed in perl so u'll need perl to use that.



p.s Before u use a tool make sure that (ai.obj/fstring.txt is in ANSI encoding and in same folder with tool).

I made quick test if new ai works, and server started with new ai, mobs were spawned, baium works (when takled with baium statue->wake up baium-> baium spawned) etc need more testing but have no time xD.


Update:
Ver 1.1 will change only npc's id so no need to worry about fstrings :P.
ver 1.2 will make a log file with some info about what was changed (line in ai.obj/npcname/c5id/c4id etc).

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
AiIdConverter.rar — 11553 байт
AiIdConverter1.1.rar — 53346 байт
AiIdConverter1.2.rar — 50502 байт
Kation is offline  
Old 09.08.2007, 19:47   #2
McBigMac
Архивный участник
 
Join Date: Aug 2005
Posts: 34
Default

it works on strings, not id's?

what's the point of this? i have changed baium id's, works with standard c4 ai.
McBigMac is offline  
Old 09.08.2007, 19:53   #3
Kation
Архивный участник
 
Join Date: Oct 2006
Posts: 57
Default

hm... maybe, if in your ai was something what was checking id of mob and comparing it to something else this tool would be usefull for u :P (for example quest-or smth- which spawns mobs if that quest uses id from c4 data in c5 id of that mob is different so it should be changed in ai too).


p.s does quests for changing proffesion with standard c4 ai works for u too?
(in c5 server).
Kation is offline  
Old 10.08.2007, 18:25   #4
McBigMac
Архивный участник
 
Join Date: Aug 2005
Posts: 34
Default

Yes, however, in interlude, the place of 3rd Quest Tablet's have moved due to fortresses.

which will require you to change the npcpos of the tablet's and the spawn loc in createprivate func's loc.


It's all strings, not id's.
Nothing has changed, in that way.

pretty much only direct script data movement, (also for other things).
McBigMac is offline  
Old 10.08.2007, 19:11   #5
Kation
Архивный участник
 
Join Date: Oct 2006
Posts: 57
Default

Example:
Code:
	push_event	
	push_const 704  //  myself
	add
	fetch_i
	push_const 1012544 <-------HERE
S3100.	"pirates_zombie_captain_b"
	push_string S3100
do i need to change that id? (it's npc id pirates_zombie_captain_b)
anyawy i'm not going to interlude but thx for info . Players told me that they couldnt finish quest to change proffesion becouse npc (which they need to kill) was not spawning, same was with the quest for subclass (fate of whisper) when rb died the chest didnt spawn (chest of cabrio/kernon/golkonda etc), so i thought that there was something wrong in ai, and i was propably right becouse now chests spawn after kiling rb etc (maybe i did something else what fixed that but i dont know what ;D ).
Kation is offline  
Old 10.08.2007, 19:16   #6
nish
Архивный участник
 
Join Date: May 2006
Posts: 237
Default

ya all ids are changed in c5 which effects quests and fishing and stuff that uses ai to summon mobs
nish is offline  
Old 10.08.2007, 19:19   #7
McBigMac
Архивный участник
 
Join Date: Aug 2005
Posts: 34
Default

I have yet to see any of your claimed issues.


I see it pushed the pch, before the string, but in the end, it's the string it pushes before the call.


And if theres' an issue, go test just change the pch to something random and test on c4
McBigMac is offline  
Old 10.08.2007, 20:38   #8
Kation
Архивный участник
 
Join Date: Oct 2006
Posts: 57
Default

As i writed before, it solved my problems.
Kation is offline  
Old 10.08.2007, 20:41   #9
nish
Архивный участник
 
Join Date: May 2006
Posts: 237
Default

ai uses npcpch ids to summon the mobs which is why ai pch ids need to be changed

if u try running c5 with c5 ids and not changing anything but the npcdata you will have lots of problems
nish is offline  
Old 11.08.2007, 10:11   #10
mcrabben7
Архивный участник
 
Join Date: Apr 2006
Posts: 461
Default

I did it all by hand :P
mcrabben7 is offline  
Old 11.08.2007, 10:20   #11
McBigMac
Архивный участник
 
Join Date: Aug 2005
Posts: 34
Default

kinda off topic, but now that were on the whole non c4 thing.


anyone know what map some of the tombs went to that disappeared from normal positions in c4/c5?
McBigMac is offline  
Old 11.08.2007, 18:56   #12
Kation
Архивный участник
 
Join Date: Oct 2006
Posts: 57
Default

Quote:
Originally Posted by mcrabben7 View Post
I did it all by hand :P
i'm to lazy to do things like that by hand :P.
Kation is offline  
Old 11.08.2007, 20:00   #13
McBigMac
Архивный участник
 
Join Date: Aug 2005
Posts: 34
Default

Quote:
Originally Posted by Kation View Post
i'm to lazy to do things like that by hand :P.
A good programmer is a lazy one.


or so wise people once said :-p
McBigMac is offline  
Old 11.08.2007, 23:53   #14
mcrabben7
Архивный участник
 
Join Date: Apr 2006
Posts: 461
Default

The problem is, I didn't want to ruin fstrings, so I did an UltraEdit regular expressions search, and started replacing.
mcrabben7 is offline  
Old 12.08.2007, 01:08   #15
nish
Архивный участник
 
Join Date: May 2006
Posts: 237
Default

php does the trick to
nish is offline  
Old 12.08.2007, 02:28   #16
Kation
Архивный участник
 
Join Date: Oct 2006
Posts: 57
Default

i writed about fstrings in first topic :P (made a tool to add changed fstring's id to fstring.txt but i'm not 100% sure if they will work well), now i need to fix 2 skills(backstab&glad/tyrant) and will be happy
Kation is offline  
Old 12.08.2007, 03:37   #17
Kation
Архивный участник
 
Join Date: Oct 2006
Posts: 57
Default

Quote:
Originally Posted by nish View Post
php does the trick to
Perl does too, i fixed my tool now it change only npc's id.
Kation is offline  
Old 12.08.2007, 07:20   #18
Corbin
Архивный участник
 
Join Date: May 2007
Posts: 2
Default

Quote:
Originally Posted by mcrabben7 View Post
I did it all by hand :P
Wow... that had to have taken a while.... You could regexp search for long enough numbers to where you might have to replace them, but still!

P.S.

Kation,

I'm more of a PHP person that perl (in fact I hardly know perl at all), but it seems that:

#setting ids for normal push_const (not npc)
for ($n = 1; $n <= 1019000; $n++) {
$ids[$n]=$n;
}

Could be more effeciently done by just doing this:

if(isset($ids[$tab[1]])) $tab[1]=$ids[$tab[1]];

Where that area is later on.... Then you wouldn't have to waste the memory and slight performance hit behind setting a million value array even if it is only integral values....

(P.S. I'm not sure if there's a function in Perl called isset, but that's what it's called in PHP, and surely there's something similar.)
Corbin is offline  
Old 12.08.2007, 21:17   #19
Kation
Архивный участник
 
Join Date: Oct 2006
Posts: 57
Default

i give a source everyone can make with that what he want to :P

updated to v1.2 ^^.
Kation is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:46.