Page 1 of 1

[Kovarex] [0.16.4] missing train auto/manual switch ...

Posted: Sun Dec 17, 2017 2:38 pm
by mophydeen
Screenshot from 2017-12-17 15-34-57.png
Screenshot from 2017-12-17 15-34-57.png (232.25 KiB) Viewed 3479 times

map:
trainwithoutautomanualswitch.zip
(9.82 MiB) Downloaded 146 times

Re: [0.16.4] missing train auto/manual switch ...

Posted: Mon Dec 18, 2017 12:06 pm
by Loewchen
This save has been modded with a "save-file mod", if you can produce this issue with a not modified save, let us know.

Re: [0.16.4] missing train auto/manual switch ...

Posted: Wed Dec 20, 2017 9:05 am
by mophydeen
If I start a new game and add the same savefilemods i'm not getting it again ... ?

new game with mod works ... :
trainwithautomanualswitch.zip
(1.98 MiB) Downloaded 136 times

Re: [0.16.4] missing train auto/manual switch ...

Posted: Thu Dec 21, 2017 10:20 am
by mophydeen
in sl-extended there is a command:

Code: Select all

/inv <-100,100> - Decrease,increase character inventory bonus.
when the bonus is > 0 this bug happens.
/inv 20 > bonus 200 : now you see the bug
/inv -20 > bonus 0 : bug is gone ...


I use the below code. It worked fine in 0.15+

Code: Select all

commands.add_command("inv", " <" .. -INVENTORY_ROWS_MAX .. "," .. INVENTORY_ROWS_MAX .. "> - Decrease,increase inventory with 10 slots.", function(param)
	characterInventory(game.players[param.player_index], param.parameter)
end)
function characterInventory(player, amountOfBonusLinesString)
  	if amountOfBonusLinesString and tonumber(amountOfBonusLinesString) and tonumber(amountOfBonusLinesString) >= -INVENTORY_ROWS_MAX and tonumber(amountOfBonusLinesString) <= INVENTORY_ROWS_MAX  then
	  	bonus = 10 * tonumber(amountOfBonusLinesString)
	  	if player.character.character_inventory_slots_bonus  + bonus > 0 then
			player.character.character_inventory_slots_bonus  = player.character.character_inventory_slots_bonus + bonus
	    else
	    	player.character.character_inventory_slots_bonus  = 0
	    end
	    if not global["config-pers"][player.name]["bonus"] then
	    	global["config-pers"][player.name]["bonus"] = {}
	    end
      global["config-pers"][player.name]["bonus"]["character_inventory_slots_bonus"] = player.character.character_inventory_slots_bonus
		if bonus < 0 then 
		    msg = "Inventory decreased by "
		else
		    msg = "Inventory increased by "
		end
		slSaysAll(msg .. player.name .. "  (bonus: " .. player.character.character_inventory_slots_bonus .. ")")
  	else
  		if not amountOfBonusLinesString then
  			amountOfBonusLinesString = ""
  		end
		slSays(player, "Please use a value between [" .. -INVENTORY_ROWS_MAX .. "," .. INVENTORY_ROWS_MAX .. "]  (used: /inv " .. amountOfBonusLinesString .. ")")
  	end
end

Re: [0.16.4] missing train auto/manual switch ...

Posted: Thu Dec 21, 2017 10:39 am
by mophydeen
This bug is caused by the way you build up the gui for trains and inventory.


see my screenrecording.
https://youtu.be/u5-nl42HYbM

Re: [0.16.4] missing train auto/manual switch ...

Posted: Thu Dec 21, 2017 5:11 pm
by Jessea2010
Loewchen wrote:This save has been modded with a "save-file mod", if you can produce this issue with a not modified save, let us know.
It happens with any Inventory increase. Try with wormmus config mod. Set inventory size to 1000 and you will see.

Re: [Kovarex] [0.16.4] missing train auto/manual switch ...

Posted: Tue Dec 26, 2017 9:44 pm
by kovarex
Duplicate of: 55378