Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   Level file size bug (https://forums.graalonline.com/forums/showthread.php?t=14234)

BocoC 10-09-2001 10:26 AM

Level file size bug
 
Um. There is this bad bug where if the level filesize is too large, the level appears corrupt and stuff online. Like my 73kb .NW level. It always appears scrambled. I even had other people upload it, and it still is scrambled online. Either that, or the Bravo NPCServer is having a sever panic attack or something...

BocoC 10-10-2001 05:53 AM

Bah.

entravial 10-10-2001 06:30 AM

~AlphaFlame~

Delteria has large-sized levels like that as well.

BocoC 10-10-2001 06:42 AM

Yes, but I have saved it under 10 different file names, 2 different file formats, even copied all the npc's to a different level, uploaded it with 2 different FTP programs, and even had somebody else upload it and each and every stupid time the level is corrupted X_X

btedji 10-10-2001 07:02 AM

Quote:

Originally posted by BocoC
Yes, but I have saved it under 10 different file names, 2 different file formats, even copied all the npc's to a different level, uploaded it with 2 different FTP programs, and even had somebody else upload it and each and every stupid time the level is corrupted X_X
wow you have some persistance there!!!

BocoC 10-10-2001 12:20 PM

I really wanted to try my level online =[

Admins 10-10-2001 08:06 PM

The limit for levels and images (auto-download)
is 64k, you should optimize some stuff instead
of complaining about the file size limit ...

ZORG1986 10-11-2001 12:24 AM

yes boco stop complaining....o_O

Brandon_Bravo 10-11-2001 03:21 AM

That certainly was mean Stefan.......:P
 
Stefan, he's not complaining about the limit, neither of us knew that there WAS a limit on level file sizes.

BocoC 10-11-2001 06:13 AM

Yes! I never knew of a limit......, until now. Thanks Stefan! Time to "optimize" level.....

BocoC 10-11-2001 06:24 AM

Oh, and please don't tell me npc's are restricted to like, 20k. My main system NPC is like, 60k in size X_X

BocoC 10-11-2001 07:43 AM

AAAAAAARRRRRRRRGGGGGGGHHHHHH!!!!

Crap. There is a restriction..... 21.1kb restriction on npcs... =[ I wonder how I can work around this for Rha. Might just have to scrap the whole server...... =[

btedji 10-11-2001 07:50 AM

sounds like a virus is infecting the level

BocoC 10-11-2001 07:51 AM

No. No Virus. Just limits. 64k limit on levels, 22k limit on npcs. My main system npc for Rha is 54kb. So, I think I have to scrap Rha. -_-"

SagaTCN 10-11-2001 08:05 AM

There's no hope of splitting the system into multiple parts (if that's possible with your particular system)? -Yin

BocoC 10-11-2001 08:38 AM

I already split it into 5 parts:
Inventory
Walking
Attacking
Damage
Status Bar

Inventory is the one that is too big. See, each window mode (items, magic, skill, equipment, status, ect) has it's own keydown code, so there are like, 4 different sets of keydown codes (I managed to put Items, Magic, Skill, and Equipment codes into 1 section since they are relatively the same). So, a big chunk of the npc is keydown related stuff. Then the other big chunk is the section that does draws everything. I have a good sized function that draws each item and name in the item window, and another for drawing each item and it's name for the equipment window. So, no, I can't split the npc =[

SagaTCN 10-11-2001 08:57 AM

Ah =( -Yin

btedji 10-11-2001 10:09 AM

my sys for dq is huge and yet it only takes up like 20kb

BocoC 10-11-2001 09:21 PM

The thing that takes up so much space in my Custom Inventory npc is that I have to have keydown code for like, 3 or 4 different modes. This is what one looks like. This is the 'D' key code for the modes that require the default item select window to open.
NPC Code:

if (this.keys[4]==1 && !this.4kd) {
x=playerx+1.5;
y=playery+2;
play rha_system_cursorselect.wav;
if (this.inventory_mode==1) {
setstring this.inventory_itemsift,-Item;
} else if (this.inventory_mode==7) {
setstring this.inventory_itemsift,#s(this.inventory_EW_Sift) ;
} else if (this.inventory_mode==4) {
setstring this.inventory_itemsift,-Magic;
} else if (this.inventory_mode==3) {
setstring this.inventory_itemsift,-Skill;
}
set this.inventory_ItemChoose;
InventoryDrawItems();
for (this.i=0;this.i<100;this.i++) {
hideimg 1000+this.i;
}
hideimg 996;
hideimg 997;
if (!this.inventory_mode==7) {
set this.inventory_noclosesound;
this.inventory_selectedItem=0;
this.inventory_selectedItem_line=1;
this.inventory_mode=0;
for (this.i=0;this.i<100;this.i++) {
hideimg 1400+this.i;
}
InventoryClose();
callweapon this.inventory_getItem,used;
} else {
this.inventory_selectedItem=0;
this.inventory_selectedItem_line=1;
this.inventory_EW_equipitem=this.inventory_getItem ;
this.inventory_mode=2;
}
unset this.infogot;
setstring client.ItemInfo,;
set this.4kd;
}
if (this.keys[4]==0 && this.4kd) { unset this.4kd; }


BocoC 10-11-2001 09:24 PM

That is only for 1 key. There are 8 keys total that I test in that section alone. Also, this is a routine that draws some stuff on the screen:
NPC Code:

} else if (this.inventory_mode==4) {
hideimg 998;
showimg 999,rha_system_CW_#s(client.Options_Skin).png,scre enwidth-192,screenheight*0.35;
showimg 1000,rha_system_window_#s(client.Options_Skin).png ,screenwidth*0.1,screenheight*0.2;
if (this.inv_keyhelp==0) {
showimg 1400,rha_system_key_#s(client.Options_Skin).png,sc reenwidth*0.1-33,screenheight*0.2-48;
if (EarnedMagicHand) {
showimg 1401,@A: Equip Left,screenwidth*0.1-33+10,screenheight*0.2-48+21;
} else {
showimg 1401,@A:,screenwidth*0.1-33+10,screenheight*0.2-48+21;
}
showimg 1402,rha_system_key_#s(client.Options_Skin).png,sc reenwidth*0.1+138-33+3,screenheight*0.2-48;
if (EarnedMagicHand) {
showimg 1403,@S: Equip Right,screenwidth*0.1+138-33+10+3,screenheight*0.2-48+21;
} else {
showimg 1403,@S:,screenwidth*0.1+138-33+10+3,screenheight*0.2-48+21;
}
showimg 1404,rha_system_key_#s(client.Options_Skin).png,sc reenwidth*0.1+138+138-33+6,screenheight*0.2-48;
showimg 1405,@D: Select,screenwidth*0.1+138+138-33+10+6,screenheight*0.2-48+21;
changeimgvis 1400,4;
changeimgvis 1401,4;
changeimgvis 1402,4;
changeimgvis 1403,4;
changeimgvis 1404,4;
changeimgvis 1405,4;
}
changeimgvis 999,4;
changeimgvis 1000,4;
setstring this.inventory_itemsift,-Magic;
InventoryDrawItems();
}


That draws the stuff when you select Magic from the options window. I have many other routines like these, which just add up space. Hmm. I can extract the Level Up code from here. Forgot about it..... But that still won't do any good for the npc =[

Admins 10-12-2001 02:55 PM

Weapons can be max 28k or so

SagaTCN 10-12-2001 08:48 PM

Hmm..I'm not sure (as I haven't had much experience with the npcserver), but could you possibly place the scripts in class files and take advantage of the 'join' command? Again, I have next to no experience when it comes to scripting for the npcserver so if this idea is incredibly stupid, forgive me. -Yin


All times are GMT +2. The time now is 10:37 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.