Page 1 of 1

Custom Maps: Unpacking Extras Layer

Posted: Tue Sep 19, 2023 11:07 pm
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?

Re: Custom Maps: Unpacking Extras Layer

Posted: Tue Sep 19, 2023 11:38 pm
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.

Re: Custom Maps: Unpacking Extras Layer

Posted: Wed Sep 20, 2023 12:48 am
by st0
Oh, is that extras_vector? Ok, I see. Thanks for pointing the way.