Custom Maps: Unpacking Extras Layer

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Post Reply
st0
Posts: 2
Joined: Tue Sep 19, 2023 10:44 pm

Custom Maps: Unpacking Extras Layer

Post by st0 »

Hello everyone, I've been a fan of Civ games since the first, and have recently started making a custom Freeciv scenario for myself. I'm having a very hard time understanding how to manipulate the "extras" layer of the maps section. I saw from a comment in the source code (savegame3.c) that extras are packed four to a character in hex. I'm not a programmer, so I don't exactly know what that means, but I've encountered bitwise data notation before and I'm sure I can figure it out from here... if I could just find the packing order. Reading C when you don't know C is, umm, frustrating. Could someone please be so kind as to post the packing order for the map extras? Or at least point me to where in the sources the packing order is defined, so I could try to read it and make sense of it myself?
cazfi
Elite
Posts: 3111
Joined: Tue Jan 29, 2013 6:54 pm

Re: Custom Maps: Unpacking Extras Layer

Post by cazfi »

Maybe you should use client (gtk ones) editor mode for this, instead of editing savegame directly.

As for the packing order, there's "extras order", that depends on the ruleset, saved within the savegame.
st0
Posts: 2
Joined: Tue Sep 19, 2023 10:44 pm

Re: Custom Maps: Unpacking Extras Layer

Post by st0 »

Oh, is that extras_vector? Ok, I see. Thanks for pointing the way.
Post Reply