View Full Version : 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?
hamidouch
06.10.2005, 03:04
labels got to be all diff imo
dVampire
06.10.2005, 05:51
One class can has size up to 512Kb
where you get this info?
is there a way to increase maximum size?
anyway ty )
Metalmurphy
06.10.2005, 11:45
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
dVampire
06.10.2005, 18:15
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.
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?
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?
hamidouch
07.10.2005, 12:04
ty ^^ if it works
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.