rathena icon indicating copy to clipboard operation
rathena copied to clipboard

AI structure data record is too long

Open reunite-ro opened this issue 1 year ago • 2 comments

rAthena Hash

https://github.com/rathena/rathena/commit/b7b6812fcf13275b54561c6a6327bb2338ad4eb7

Client Date

Not related

Server Mode

Renewal

Result

Currently AI data is stored in mob_db_re as ai varchar(2) DEFAULT NULL, And in renewal, there is Ai: Abr_Offensive for example as below.

  • Id: 20835 AegisName: ABR_DUAL_CANNON Name: ABR Duel Cannon Level: 200 Attack: 1 Attack2: 1 Str: 0 Agi: 0 Vit: 0 Int: 0 Dex: 0 Luk: 0 AttackRange: 5 SkillRange: 8 ChaseRange: 12 Size: Medium Race: Formless Element: Neutral ElementLevel: 1 WalkSpeed: 200 AttackDelay: 384 AttackMotion: 768 ClientAttackMotion: 576 DamageMotion: 1008 Ai: Abr_Offensive

Relevant Log Output

MySQL said: Documentation

#1406 - Data too long for column 'ai' at row 1

Expected Result

Maybe change structure of AI from varchar(2) to higher ? Depends on rAthena decision.

How to Reproduce

try to generate sql from mob_db_re and try to run it.

Official Information

This error info is just from mysql

Modifications that may affect results

No response

reunite-ro avatar Apr 06 '25 11:04 reunite-ro

PR that introduced the issue: #9183

neico avatar Apr 10 '25 16:04 neico

Aware of it, though the SQL files aren't really updated anymore (so the provided file that fills the monster database will not use the ABR AI values either). You can just change the type to varchar(20) if you create a new file before executing. I'll check how to move forward with this.

Playtester avatar Apr 10 '25 18:04 Playtester

[Err] 1264 - Out of range value for column 'equip_level_min' at row 1
[Err] REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`weight`,`defense`,`slots`,`location_shoes`,`armor_level`,`equip_level_min`,`refineable`,`gradable`,`trade_nodrop`,`trade_notrade`,`trade_nocart`,`trade_noguildstorage`,`trade_nomail`,`trade_noauction`,`script`) VALUES (470335,'Dimension_B_Greave','Dimension World Battle Greaves','Armor',1200,100,1,true,2,260,true,true,true,true,true,true,true,true,'.@g = getenchantgrade();\n.@r = getrefine();\nbonus bMaxHPrate,-10;\nbonus bPow,7;\nbonus bCon,7;\nbonus bVariableCastrate,-(.@r/2);\nif (.@r>=7) {\n   bonus bAspdRate,10;\n   if (.@r>=9) {\n      bonus bShortAtkRate,10;\n      bonus bPAtk,5;\n      if (.@r>=11) {\n         bonus bShortAtkRate,10;\n         bonus bFixedCast,-1000;\n         bonus bVariableCastrate,-5;\n      }\n   }\n}\nif (.@g>=ENCHANTGRADE_D) {\n   bonus bBaseAtk,25;\n   bonus bPow,5;\n   bonus bCon,5;\n   if (.@g>=ENCHANTGRADE_C) {\n      bonus bPAtk,3;\n      bonus bAtkRate,3;\n      if (.@g>=ENCHANTGRADE_B) {\n         bonus bPAtk,3;\n         bonus bAtkRate,5;\n         if (.@g>=ENCHANTGRADE_A) {\n            bonus bShortAtkRate,15;\n            bonus2 bAddRace2,RC2_Encroached_Gephenia,15;\n         }\n      }\n   }\n}');
[Msg] Finished - Unsuccessfully
--------------------------------------------------


[Err] 1406 - Data too long for column 'ai' at row 1
[Err] REPLACE INTO `mob_db_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`attack`,`attack2`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`) VALUES (20834,'ABR_BATTLE_WARIOR','ABR Battle Warrior','ABR Battle Warrior',200,1,1,0,0,0,0,0,0,3,10,12,'Medium','Formless','Neutral',1,200,432,864,1440,'Abr_Offensive');
[Msg] Finished - Unsuccessfully
--------------------------------------------------

Lemongrass3110 avatar Sep 15 '25 19:09 Lemongrass3110