Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Incompatible Marshal file format?

I got this TypeError when using the load_data built-in function. It says:
incompatible marshal file format (can't be read)
I'm trying to load a .rxdata file, edited with notepad.

What should I do?
 
No no no you can't use load_data that way I heard that the first two bytes determines the version.

now I don't know too much about this so someone correct me if I am wrong but when you use save_data / Marshal.dump the data is written to a file in a binary format like for instance. Here is some Marshaled Data

ࠄᅛ漰᜺偒㩇䈺瑡汴䍥浯慭摮㨞䀌捳楲瑰"༺桀汥彰整瑸"਺湀浡≥䄋瑴捡㩫䀌楨摤湥㩆䀑浡潭牟晥汩筬㨀䀏捩湯湟浡≥㨀䀐慰慲敭整獲{်着慥潰彮摩孳㨀䀕潣浭湯敟敶瑮楟楤㨀䀓灳捥慩彬敬牡≮昊污敳਺慀浭筯㨀䀌歳汩獬[఺牀瑡湩楧㨏䀎慮敭獟瑥{ᄺ慀瑣牯江癥汥}i਺歀湩楤㨀䀏歳汩彬敳≴㨀䀑敮瑸浟瑥潨≤猗慴瑲敟敮祭獟汥捥㩴䀊祴数i࠺楀楤㨆䀑敤捳楲瑰潩≮㨀䀑汣獡彳敬敶絬椀㨀䀏牡潭彲摩孳㨀䀒湡浩瑡潩彮摩iฺ獀楫汬楟楤漀;㬞∆㬀∇㬀∈匊楫汬ऻ㭆笊㬀∋㬀笌㬀嬍㬀椎㬀∏昊污敳ျ{ᄻ[ሻཀྵጻ{ᐻ}iᔻ٩ᘻ"᜻ᜢ瑳牡彴歳汩彬敳敬瑣ᠻi᤻ݩᨻ"ᬻ}i᰻[ᴻiḻi㭯Ḁػ"ܻ"࠻ଢ敄敦摮ऻ㭆笊㬀∋㬀笌㬀嬍㬀椎㬀∏昊污敳ျ{ᄻ[ሻཀྵጻ{ᐻ}iᔻiᘻ"᜻ᘢ桰獡㍥湟硥彴捡潴㭲椘㬆椙㬈√㬀紛椀㬀嬜㬀椝㬀椞漀;㬞∆㬀∇㬀∈䤉整㭭䘉਻{଻"఻{഻[฻i༻ਢ慦獬㭥笐㬀嬑㬀椒㬏笓㬀純椀㬀椕㬇∖㬀∗猖慴瑲楟整彭敳敬瑣ᠻi᤻३ᨻ"ᬻ}i᰻[ᴻiḻi㭯Ḁػ簢灨㴠⠠捡潴⹲慭桸⁰*捡潴⹲灨
 㔱※捡潴⹲灨⬠‽灨※捡潴⹲慤慭敧㴠ⴠ灨※捡潴⹲慤慭敧灟灯㴠琠畲㭥䀠瑳瑡獵睟湩潤⹷敲牦獥㭨∇刏来湥牥瑡㭥∈刏来湥牥瑡㭥䘉਻{଻"఻{഻[฻i༻ਢ慦獬㭥笐㬀嬑㬀椒㬏笓㬀純椀㬀椕㬀∖㬀∗瀖慨敳弳敮瑸慟瑣牯ᠻࡩ᤻੩ᨻ"ᬻ}i᰻[ᴻᕩḻi㭯Ḁػ索灳㴠爠湡⡤捡潴⹲慭獸⁰ 㔱⬠ㄠ
‫㬵愠瑣牯献⁰㴫猠㭰愠瑣牯搮浡条⁥‽猭㭰愠瑣牯搮浡条彥潰⁰‽牴敵※獀慴畴彳楷摮睯爮晥敲桳ܻढ楗汬࠻ढ楗汬ऻ㭆笊㬀∋㬀笌㬀嬍㬀椎㬀∏昊污敳ျ{ᄻ[ሻཀྵጻ{ᐻ}iᔻiᘻ"᜻ᘢ桰獡㍥湟硥彴捡潴㭲椘㬈椙㬋√㬀紛椀㬀嬜㬀椝㬗椞漀;㬞∆㬀∇㬀∈䠉汯㭹䘉਻{଻"఻{഻[฻i༻ਢ慦獬㭥笐∆猇楰㬈笑椈椠椈椞椆椟㬇椒㬏笓㬀純椀㬀椕㬆∖㬀∗猗慴瑲獟楫汬獟汥捥㭴椘㬀椙㬌√㬀紛椀㬀嬜㬀椝㬀椞漀;㬞∆㬀∇㬀∈䔎敬敭瑮污ऻ㭆笊∆搋晥湥孤椇椆㬀∋㬀笌㬀嬍㬀椎㬀∏昊污敳ျٻܢ灳୩ᄻ⬢歳汩⹬汥浥湥彴敳⹴湩汣摵獥慟祮⠿ⰱⰳ⤴ሻཀྵጻ{ᐻ}iᔻ٩ᘻ"᜻ᜢ瑳牡彴歳汩彬敳敬瑣ᠻi᤻൩ᨻ"ᬻ}i᰻[ᴻiḻi㭯Ḁػ"ܻ"࠻ഢ慐慲祬敺ऻ㭆笊㬀∋㬀笌㬀嬍㬀椎㬀∏昊污敳ျ{ᄻ[ሻཀྵጻ{ᐻ}iᔻ٩ᘻ"᜻ᘢ桰獡㍥湟硥彴捡潴㭲椘㬀椙㬎√㬀紛椀㬀嬜椆㬤椝㬀椞漱;㬞∆㬀∇㬀∈䘑物⁥瑓牡整㭲䘉਻{଻"఻{഻[฻i༻ਢ慦獬㭥笐㬀嬑㬀椒㬏笓㬀純椀㬀椕㬆∖猢楫汬攮敬敭瑮獟瑥椮据畬敤⠿⤱᜻ᜢ瑳牡彴歳汩彬敳敬瑣ᠻi᤻ཀྵᨻ"ᬻ}i᰻[ᴻiḻi㭯Ḁػᘢ捡潴⹲敲潣敶彲污㭬∇䘑汵效污湩㭧∈䘑汵效污湩㭧䘉਻{଻"఻{഻[฻i༻␢捡潴⹲摩㴠‽‷☦爠湡⡤〱⤰㰠ㄠ㬰笐㬀嬑㬀椒㬏笓㬀純椀㬀椕㬀∖㬀∗瀖慨敳弳敮瑸慟瑣牯ᠻࡩ᤻ၩᨻ"ᬻ}i᰻[ᴻ᭩ḻi


here is the same file just not Marshaled
Code:
id				1
name				"Attack"
name_set			{
kind				0
type				0
rating			10
icon_name			""
skill_id			0
common_event_id		0
animation_id		0
weapon_ids			]
armor_ids			[]
skill_set			""
skills			]
ammo				{}
ammo_refill			{}
class_level			{}
actor_level			{}
description			""
help_text			""
special_learn		"false"
hidden			false
script			""
parameters			}
next_method			"start_enemy_select"

id				2
name				"Skill"
name_set			{}
kind				1
type				0
rating			10
icon_name			""
skill_id			0
common_event_id		0
animation_id		0
weapon_ids			[]
armor_ids			[]
skill_set			""
skills			[]
ammo				{}
ammo_refill			{}
class_level			{}
actor_level			{}
description			""
help_text			""
special_learn		"false"
hidden			false
script			""
parameters			{}
next_method			"start_skill_select"

id				3
name				"Defend"
name_set			{}
kind				0
type				1
rating			10
icon_name			""
skill_id			0
common_event_id		0
animation_id		0
weapon_ids			[]
armor_ids			[]
skill_set			""
skills			[]
ammo				{}
ammo_refill			{}
class_level			{}
actor_level			{}
description			""
help_text			""
special_learn		"false"
hidden			false
script			""
parameters			{}
next_method			"phase3_next_actor"

id				4
name				"Item"
name_set			{}
kind				2
type				0
rating			10
icon_name			""
skill_id			0
common_event_id		0
animation_id		0
weapon_ids			[]
armor_ids			[]
skill_set			""
skills			[]
ammo				{}
ammo_refill			{}
class_level			{}
actor_level			{}
description			""
help_text			""
special_learn		"false"
hidden			false
script			""
parameters			{}
next_method			"start_item_select"

id				5
name				"Regenerate"
name_set			{}
kind				0
type				3
rating			10
icon_name			""
skill_id			0
common_event_id		0
animation_id		16
weapon_ids			[]
armor_ids			[]
skill_set			""
skills			[]
ammo				{}
ammo_refill			{}
class_level			{}
actor_level			{}
description			""
help_text			"Regenerate"
special_learn		"false"
hidden			false
script			"hp = (actor.maxhp - actor.hp) / 15; actor.hp += hp; actor.damage = -hp; actor.damage_pop = true; @status_window.refresh"
parameters			{}
next_method			"phase3_next_actor"

id				6
name				"Will"
name_set			{}
kind				0
type				3
rating			10
icon_name			""
skill_id			0
common_event_id		0
animation_id		18
weapon_ids			[]
armor_ids			[]
skill_set			""
skills			[]
ammo				{}
ammo_refill			{}
class_level			{}
actor_level			{}
description			""
help_text			"Will"
special_learn		"false"
hidden			false
script			"sp = rand(actor.maxsp / 15 + 1) + 5; actor.sp += sp; actor.damage = -sp; actor.damage_pop = true; @status_window.refresh"
parameters			{}
next_method			"phase3_next_actor"

id				7
name				"Holy"
name_set			{}
kind				1
type				0
rating			10
icon_name			""
skill_id			0
common_event_id		0
animation_id		0
weapon_ids			[]
armor_ids			[]
skill_set			""
skills			{27=>3, 25=>1, 26=>2}
ammo				{"sp"=>3}
ammo_refill			{}
class_level			{}
actor_level			{}
description			""
help_text			""
special_learn		"false"
hidden			false
script			""
parameters			{}
next_method			"start_skill_select"

id				8
name				"Elemental"
name_set			{}
kind				1
type				0
rating			10
icon_name			""
skill_id			0
common_event_id		0
animation_id		0
weapon_ids			[]
armor_ids			[]
skill_set			""
skills			"skill.element_set.includes_any?(1,3,4)"
ammo				{"sp"=>6}
ammo_refill			{"defend"=>[1, 0]}
class_level			{}
actor_level			{}
description			""
help_text			""
special_learn		"false"
hidden			false
script			""
parameters			{}
next_method			"start_skill_select"

id				9
name				"Paralyze"
name_set			{}
kind				1
type				0
rating			10
icon_name			""
skill_id			44
common_event_id		0
animation_id		0
weapon_ids			[]
armor_ids			[31]
skill_set			""
skills			[]
ammo				{}
ammo_refill			{}
class_level			{}
actor_level			{}
description			""
help_text			""
special_learn		"false"
hidden			false
script			""
parameters			{}
next_method			"phase3_next_actor"

id				10
name				"Fire Starter"
name_set			{}
kind				1
type				0
rating			10
icon_name			""
skill_id			0
common_event_id		0
animation_id		0
weapon_ids			[]
armor_ids			[]
skill_set			"skill.element_set.include?(1)"
skills			[]
ammo				{}
ammo_refill			{}
class_level			{}
actor_level			{}
description			""
help_text			""
special_learn		"false"
hidden			false
script			""
parameters			{}
next_method			"start_skill_select"

id				11
name				"Full Healing"
name_set			{}
kind				0
type				3
rating			10
icon_name			""
skill_id			0
common_event_id		0
animation_id		22
weapon_ids			[]
armor_ids			[]
skill_set			""
skills			[]
ammo				{}
ammo_refill			{}
class_level			{}
actor_level			{}
description			""
help_text			"Full Healing"
special_learn		"actor.id == 7 && rand(100) < 10"
hidden			false
script			"actor.recover_all"
parameters			{}
next_method			"phase3_next_actor"



(note this is from my Advanced Battle Commands Script)

so what you want to do is load the data from the text file manipulate it and then use Marshal.dump / save data to make it loadable by Marshal.load / load data

you can create a simple .rb file and run that if you don't need the RMXP Hidden Classes or create a script within RMXP for it
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top