Post Pacific  

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

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 06.10.2005, 02:46   #1
RmzVoid
Архивный участник
 
Join Date: Apr 2005
Posts: 357
Default ai.obj code limitations

2 questions:

1) is there code size limitations in one handleR? I have about 30k strings in ai.obj in one handler (trying make symbol maker ai to give symbol as on off). but npc server crash on the middle of handler. I am process all 180 dyes with full class checkings, +5 -10 max-min limit of stat. then i make code only for 1 type if dye, all works fine.

2) (may be reason of first trouble) Should labels (LXXXXX) in ai.obj be unical whole ai.obj? Or lables may be unical whole one class? Is there jumps from one class to another if they have identical labels?
RmzVoid is offline  
Old 06.10.2005, 03:04   #2
hamidouch
Архивный участник
 
Join Date: Mar 2005
Posts: 475
Default

labels got to be all diff imo
hamidouch is offline  
Old 06.10.2005, 05:51   #3
dVampire
Архивный участник
 
Join Date: Jun 2005
Posts: 14
Default

One class can has size up to 512Kb
dVampire is offline  
Old 06.10.2005, 06:03   #4
RmzVoid
Архивный участник
 
Join Date: Apr 2005
Posts: 357
Default

where you get this info?

is there a way to increase maximum size?

anyway ty )
RmzVoid is offline  
Old 06.10.2005, 11:45   #5
Metalmurphy
Архивный участник
 
Join Date: Feb 2005
Posts: 766
Default

Quote:
Originally Posted by hamidouch
labels got to be all diff imo
trough out the same class yes, through the whole ai.obj no. i got plenty of costom ai with same labels and string on other classes and both work fine
Metalmurphy is offline  
Old 06.10.2005, 18:15   #6
dVampire
Архивный участник
 
Join Date: Jun 2005
Posts: 14
Default

Quote:
Originally Posted by RmzVoid
where you get this info?

is there a way to increase maximum size?

anyway ty )
I don't know way to increase maximum size. L2NPC allocate 512Kb of memory or every class and stack for him.
dVampire is offline  
Old 06.10.2005, 23:02   #7
RmzVoid
Архивный участник
 
Join Date: Apr 2005
Posts: 357
Default

ty dVampire
this was a reason on NPC server crash. but what size do you mean?
512000 chars? or 512000 unicode chars? i have 446k bytes for one class (if I measure file size saved in ANSI) and 892k bytes - for unicode format? what format I need use?
RmzVoid is offline  
Old 07.10.2005, 07:01   #8
tigra
Архивный участник
 
Join Date: Jul 2005
Posts: 41
Default

may be this schema can help you:

class a: citizen
handler 32
//32 proceed (part 2)
handler_end
class_end

class b : a
handler 32
//32 proceed (part 1)
call_super
handler_end
class_end

в общем просто размазать обработку по цепочке классов child-parent

some Q about child-parent:
1. if I initialize some variable, i0 for example in class B, does value will be the same in A, or I should reinitialize value again?

2. Should I have the same handler descriprion in any child classes as in first parent class, where hadler declared?
I mean:
class A:
MENU_SELECTED(ask, reply, talker, i0)

and I should have the same in class B and any classes, which потомки(child) from class A?
tigra is offline  
Old 07.10.2005, 12:04   #9
hamidouch
Архивный участник
 
Join Date: Mar 2005
Posts: 475
Default

ty ^^ if it works
hamidouch is offline  
Old 08.10.2005, 00:06   #10
RmzVoid
Архивный участник
 
Join Date: Apr 2005
Posts: 357
Default

2 dVampire

10x, you helps a lot
I process in ai.obj only most usefull dyes (+1-1 +2-2 ... +4-4, total 60, not 180), code size about 360kb. And all work fine Full functional symbols coming soon...

2 tigra
1) I think call_super just calls function (handler) from parent class with parents NEW variables, so parents handler cant see child i0, i1, ..., i9. IMHO. not tested.
you can check this by simble code (abstract code)
class a: citizen
handler 32
FHTML_SetInt
ShowFHTML
handler_end
class_end

class b : a
handler 32
i0=5
call_super
handler_end
class_end


2) no u dont mast have same handler if it not changes.
I inherit symbol_maker class from citizen, and citizen's handler TALKED works in symbol_maker class too.
RmzVoid 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 20:47.