Page 1 of 1

text plates in chinese

Posted: Wed Nov 21, 2018 5:19 pm
by joker1987
hi,everyone,im a factorio player from china,this is a awsome game!now i want to create mod to cn players.
here is the thing.
i want to create mod like 'text plates' with chinese. in eng,there only 26words,so they can simply create 26 img file and put it in mod
but in chinese,there are over 8500 word.that's a lot of work,and maybe mod is too big
so i think maybe i can use api to create chinese version text plates.
my question is
how can i create/render image from string.
is there api like create text shadow/change text texture with img/create text backgroud with image

sorry for my poor english~

thx for any respond

Re: text plates in chinese

Posted: Wed Nov 21, 2018 5:40 pm
by eradicator
The only entity that can render text is "flying-text", but you can't chose a font or special rendering for it. If one character is 32x32 pixels a 2048*2048 sprite sheet can hold 4096 characters, so you'd need less than 3 sheets for the most common characters. I.e. size wise it would be just fine, you just need to find a premade bitmap based font and make it into some nice sprite sheets, then auto-generate the data stage and think of a good way to allow players to actually use them :).

Re: text plates in chinese

Posted: Wed Nov 21, 2018 6:02 pm
by joker1987
eradicator wrote: Wed Nov 21, 2018 5:40 pm The only entity that can render text is "flying-text", but you can't chose a font or special rendering for it. If one character is 32x32 pixels a 2048*2048 sprite sheet can hold 4096 characters, so you'd need less than 3 sheets for the most common characters. I.e. size wise it would be just fine, you just need to find a premade bitmap based font and make it into some nice sprite sheets, then auto-generate the data stage and think of a good way to allow players to actually use them :).
thx for helping bro!
i think maybe i need to dev a tool to convert chinese word to bitmap and it must has factorio art style,that's a big challenge to me :shock:
anyway thx again