Solarus-Games English Forum

Solarus => Development => Topic started by: YoshiMario2000 on May 31, 2015, 11:55:05 PM

Title: A few Questions.
Post by: YoshiMario2000 on May 31, 2015, 11:55:05 PM
Is it possible to set the hero textures and hit box set to 16x16 or no?

Support for ubuntu on 1.4.1 without using wine?

Possible to set how much damage the player receives when wearing a certain tunic?
For like support for both male and female heroes?
Title: Re: A few Questions.
Post by: Renkineko on June 01, 2015, 07:30:19 AM
About the tunic, you can set a modifier with the function on_taking_damage (documentation : http://www.solarus-games.org/doc/latest/lua_api_hero.html#lua_api_hero_on_taking_damage and an example in use : https://github.com/Renkineko/solarus-nrfh/blob/master/data/physical_condition.lua#L95 ).

If I remember, for now, the hero size is hardcoded but it will change in the future. About the support for both male and female heroes, I suppose you can play with tunic sprites, but there is not a customized hero system available for now.

Ubuntu should be available without using wine, but christopho will confirm or infirm this.
Title: Re: A few Questions.
Post by: Christopho on June 01, 2015, 09:24:37 AM
We don't provide ubuntu packages yet but it is very easy to compile on Ubuntu from the source code:

Install the necessary libraries:
$ sudo apt-get install build-essential cmake libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libluajit-5.1-dev libphysfs-dev libopenal-dev libvorbis-dev libmodplug-dev

Download and extract solarus:
$ wget http://www.solarus-games.org/downloads/solarus/solarus-1.4.2-src.tar.gz
$ tar xzf solarus-1.4.2-src.tar.gz

Compile and install solarus:
$ cd solarus-1.4.2
$ mkdir build
$ cd build
$ cmake ..
$ make -j4
$ sudo make install
Title: Re: A few Questions.
Post by: YoshiMario2000 on June 02, 2015, 08:26:15 PM
Thanks, I'll look into to that.

Aslo, I was trying to make npc change sprites ingame wothout changing the animation.
(npc_name:set_sprite("Zora2"))but I couldn't get it to work.
Title: Re: A few Questions.
Post by: Christopho on June 02, 2015, 09:03:15 PM
There is no set_sprite() method on NPCs. In the current version, there is no way to change the sprite of an NPC. This is possible with custom entities though, using custom_entity:create_sprite(sprite_id).
Title: Re: A few Questions.
Post by: YoshiMario2000 on June 03, 2015, 12:45:51 AM
Quote from: Christopho on June 02, 2015, 09:03:15 PM
There is no set_sprite() method on NPCs. In the current version, there is no way to change the sprite of an NPC. This is possible with custom entities though, using custom_entity:create_sprite(sprite_id).
OK then. Is there a way I can change witch sprite I want to use on the same npc?
or do I have to use multiple npcs to get the job done?
Title: Re: A few Questions.
Post by: Christopho on June 03, 2015, 08:51:41 AM
As I was saying, no. You have to use multiple NPCs or a custom entity.