Ruleset and unit graphics manipulation

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Post Reply
User avatar
Corbeau
Elite
Posts: 1292
Joined: Mon Jan 13, 2014 11:13 pm

Ruleset and unit graphics manipulation

Post by Corbeau »

I'm working on a different ruleset (*very* different) and one of the essential things I need is adding a new unit. However, is that something that can be done on a ruleset level? I can use an existing unit slot (for example, Crusaders are completely useless), only need to change the existing unit image. However, as far as I know, that would probably need having to grab the new image file outside the ruleset directory for everyone wanting to play that version of the game. Or am I wrong? Any possible solutions to this?
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
The Square Cow
Veteran
Posts: 53
Joined: Wed Nov 19, 2014 5:47 pm

Re: Ruleset and unit graphics manipulation

Post by The Square Cow »

The normal solution is to make a custom tileset just for your mod. Then you tell the client that it should use your custom tileset for that mod. Like this:

Code: Select all

[tileset]
prefered="<name of your tileset>"
Then you can define what ever unit tags you need in the tileset and use them in the ruleset.

It is still a good idea to use normal unit tags in the alt graphic section, because the client won't crash on loading your ruleset if it is using the wrong tileset.
User avatar
Corbeau
Elite
Posts: 1292
Joined: Mon Jan 13, 2014 11:13 pm

Re: Ruleset and unit graphics manipulation

Post by Corbeau »

Thanks, I'll check itout.

However, for multiplayer, everybody who is playing the game needs to download the tileset, right? (Basically, just the file with the new unit image)
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
The Square Cow
Veteran
Posts: 53
Joined: Wed Nov 19, 2014 5:47 pm

Re: Ruleset and unit graphics manipulation

Post by The Square Cow »

They would have an easier time if they did. Otherwise, assuming that you listed normal unit tags for the alt tags, different units will look the same. (The other people could still tell the difference by middle clicking on the unit and looking at its name).

If you are adding just a few units then if you mark the alternative graphic fields as the crusaders and the elephants then if the other people don't download the new tile set, they could at least differentiate between the units easily.

Also note that it seems to work (from my limited testing) to tag units with graphics that are meant for other things like terrain specials. For example, it will work to tag a unit with "ts.whales" but it will be confusing if you also have whales as a terrain special.


You could bundle your rule set and tileset into one zip file, and tell people just drag the files into their freeciv folder to make it easier.
Post Reply