RadiantRoma

  • Content Count

    289
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Downloads

Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Posts posted by RadiantRoma


  1. Would it ever be possible to have a world completely covered in land... Like have 0 water... ? It would probably take a while to load up and a lot to handle for the server cause the map sizes are so big, but how about instead one "blob" of a land mass with no water in between? I just like when all the land is bunched up together and I don't have to walk across the entire map to get to a biome because of all the water in the way. 

    I've gotten out of the modding game for the time being, and I wasn't very adept with worldgen anyway, but wonder if making a map without water cutting into everywhere would be cool....


  2. I want to make a character that is able to transform into a large monster like thing, just like Woodie. 

    I started off by copy and pasting Woodie's prefab into my character's, ("Willem"), and got to work. The first thing I did was to take out the codes referring to Lucy, as she won't be needed at all for this. I launched the game and tested a lot to see if everything was working as it should be along the way, and it was. The next step was a bit more difficult but I did it, completely removed the "Beaverness" component to becoming a beaver. So now (just for testing purposes), when Willem eats a seed he transforms, and when he eats twigs he transforms back. Great! It works. It's easy, it's awesome.

    Problems that have always persisted are

    • The beaver mode is actually invisible. Despite having the beaver's anim assets in my mod, and putting them on the asset list, they never appear in game.
    • The colour cubes overlays have always been sort of funky. I get some weird grainy thing while in human form but then beaver-orange-overlay when beaver form.
    • The hoedown music doesn't play, this doesn't matter to me that much, but just unsure why.

    So here are the things I am asking for assistance

    • Make the beaver appear. I will create custom textures before release, but making the anims work with the default beaver is a non-starter.
    • Make the inventory system work while in beaver mode. I want this to be a mode that makes the character stronger but not disabled. Using inventory and accessing chests might be difficult, the same with picking things off the ground.
    • Custom overlay. Either this or just no overlay would be preferable to what it is now.

    As always, any help will be greatly appreciated and I will give credit where credit is due.

    Scarecrow.zip


  3. Hey everyone, I'm back at modding and want to start off by fixing my previous mods. One of my mods, Cave Content Surfaced, makes a new prototype machine, recipe tab, and science level.

    The mod works pretty well as far as I can tell, except for one error, that if you play as Wickerbottom it crashes the game. From what I can tell, the problem occurs because the game tries to apply Wickerbottom's science bonus onto my "CAVESCIENCE", but I don't have some sort of variable set for her bonus and it crashes the game. 

    Here is the error in the crash log;

    Spoiler

    [00:12:28]: [string "scripts/components/builder.lua"]:497: attempt to compare number with nil
    LUA ERROR stack traceback:
    scripts/components/builder.lua:497 in () ? (Lua) <489-507>
       self =
          exclude_tags = table: 68AD3C38
          buffered_builds = table: 68AD3A30
          recipes = table: 68AD3210
          station_recipes = table: 68AD3788
          bonus_tech_level = 0
          accessible_tech_trees = table: 68AD38A0
          inst = 110516 - wickerbottom (valid:true)
          _ = table: 68AD2F90
       recname = wall_wood_item
       recipe = table: 201DCF48
       has_tech = true
       i = 9
       v = CAVESCIENCE
    =(tail call):-1 in ()  (tail) <-1--1>
    scripts/widgets/crafting.lua:184 in (method) UpdateRecipes (Lua) <176-219>
       self =
          but_h = 127
          callbacks = table: 19520580
          upconnector = Image - images/hud.xml:craft_sep_h.tex
          valid_recipes = table: 188CC9A0
          scrolldir = true
          inst = 110917 -  (valid:true)
          focus = false
          idx = -1
          but_w = 127
          children = table: 19520800
          max_slots = 10
          focus_flow_args = table: 195205A8
          focus_target = false
          current_slots = 10
          downendcapbg = Image - images/hud.xml:craft_sep.tex
          upbutton = BUTTON
          owner = 110516 - wickerbottom (valid:true)
          downbutton = BUTTON
          can_fade_alpha = true
          upendcapbg = Image - images/hud.xml:craft_sep.tex
          downconnector = Image - images/hud.xml:craft_sep_h.tex
          name = Crafting
          enabled = true
          focus_flow = table: 19520648
          craftslots = CraftSlots
          shown = true
          bg = TileBG
       k = wall_wood_item
       v = table: 201DCF48
    scripts/widgets/crafting.lua:47 in (field) _ctor (Lua) <13-48>
       self =
          but_h = 127
          callbacks = table: 19520580
          upconnector = Image - images/hud.xml:craft_sep_h.tex
          valid_recipes = table: 188CC9A0
          scrolldir = true
          inst = 110917 -  (valid:true)
          focus = false
          idx = -1
          but_w = 127
          children = table: 19520800
          max_slots = 10
          focus_flow_args = table: 195205A8
          focus_target = false
          current_slots = 10
          downendcapbg = Image - images/hud.xml:craft_sep.tex
          upbutton = BUTTON
          owner = 110516 - wickerbottom (valid:true)
          downbutton = BUTTON
          can_fade_alpha = true
          upendcapbg = Image - images/hud.xml:craft_sep.tex
          downconnector = Image - images/hud.xml:craft_sep_h.tex
          name = Crafting
          enabled = true
          focus_flow = table: 19520648
          craftslots = CraftSlots
          shown = true
          bg = TileBG
       owner = 110516 - wickerbottom (valid:true)
       num_slots = 10
       but_w = 127
       but_h = 127
    scripts/widgets/controllercrafting.lua:19 in (field) _ctor (Lua) <18-52>
       self =
          but_h = 127
          callbacks = table: 19520580
          upconnector = Image - images/hud.xml:craft_sep_h.tex
          valid_recipes = table: 188CC9A0
          scrolldir = true
          inst = 110917 -  (valid:true)
          focus = false
          idx = -1
          but_w = 127
          children = table: 19520800
          max_slots = 10
          focus_flow_args = table: 195205A8
          focus_target = false
          current_slots = 10
          downendcapbg = Image - images/hud.xml:craft_sep.tex
          upbutton = BUTTON
          owner = 110516 - wickerbottom (valid:true)
          downbutton = BUTTON
          can_fade_alpha = true
          upendcapbg = Image - images/hud.xml:craft_sep.tex
          downconnector = Image - images/hud.xml:craft_sep_h.tex
          name = Crafting
          enabled = true
          focus_flow = table: 19520648
          craftslots = CraftSlots
          shown = true
          bg = TileBG
       owner = 110516 - wickerbottom (valid:true)
    scripts/class.lua:181 in (upvalue) ControllerCrafting (Lua) <171-184>
       class_tbl = table: 18E35CD0
       arg = nil
       obj = Crafting
    scripts/widgets/crafttabs.lua:62 in (field) _ctor (Lua) <44-223>
       self =
          enabled = true
          focus_target = false
          craft_idx_by_tab = table: 19520788
          shown = true
          owner = 110516 - wickerbottom (valid:true)
          can_fade_alpha = true
          focus_flow_args = table: 195203C8
          inst = 110916 -  (valid:true)
          focus 
    [00:12:28]: [string "scripts/components/builder.lua"]:497: attempt to compare number with nil
    LUA ERROR stack traceback:
        scripts/components/builder.lua:497 in () ? (Lua) <489-507>
        =(tail call):-1 in ()  (tail) <-1--1>
        scripts/widgets/crafting.lua:184 in (method) UpdateRecipes (Lua) <176-219>
        scripts/widgets/crafting.lua:47 in (field) _ctor (Lua) <13-48>
        scripts/widgets/controllercrafting.lua:19 in (field) _ctor (Lua) <18-52>
        scripts/class.lua:181 in (upvalue) ControllerCrafting (Lua) <171-184>
        scripts/widgets/crafttabs.lua:62 in (field) _ctor (Lua) <44-223>
        scripts/class.lua:181 in (upvalue) CraftTabs (Lua) <171-184>
        scripts/widgets/controls.lua:141 in (upvalue) constructor (Lua) <28-158>
        scripts/modutil.lua:147 in (upvalue) constructor (Lua) <146-149>
        scripts/modutil.lua:147 in (upvalue) constructor (Lua) <146-149>
        scripts/modutil.lua:147 in (upvalue) constructor (Lua) <146-149>
        

    I also uploaded the modmain and prefab file for the prototyper.

    Any help would be greatly appreciated!

    help fix me mod.zip


  4. @DarkXero Oops actually, been testing. The cave tab (and cavescience? it's kinda hard to know the difference between the two when they're bsaically the same thing) becomes available with any crafting machine. Science machine, alchemy engine, ancient pseudoscience, all of em. Not sure what could cause this. In case you wanted to poke through again, here's the latest version.

    Cave Content Surfaced.zip


  5. 8 hours ago, DarkXero said:
    
    -- modmain
    -- We will add the CAVESCIENCE crafting tab
    
    -- Add it to the tech trees
    local TechTree = require("techtree")
    table.insert(TechTree.AVAILABLE_TECH, "CAVESCIENCE")
    
    
    -- NONE gets created before our thing is added to AVAILABLE_TECH, so hack it in
    TECH.NONE.CAVESCIENCE = 0
    
    
    -- Our tab
    -- String and ID, num sort, atlas, image, owner tag, crafting station
    -- Either is valid for modmain recipes: MYCAVETAB or CUSTOM_RECIPETABS.CAVESCIENCE
    local MYCAVETAB = AddRecipeTab("CAVESCIENCE", 10, "images/cavetab.xml", "cavetab.tex", nil, true)
    
    -- Replace the ID for a the name
    STRINGS.TABS.CAVESCIENCE = "Cave"
    
    
    -- Our science levels (set to one since one prototyper is enough)
    TECH.CAVESCIENCE_ONE = {CAVESCIENCE = 1}
    
    -- Cave machine gets same bonuses as CAVESCIENCE_ONE so it unlocks it
    TUNING.PROTOTYPER_TREES.CAVEMACHINE = TechTree.Create({CAVESCIENCE = 1})
    
    
    -- prototyper
    
    inst:AddComponent("prototyper")
    inst.components.prototyper.trees = TUNING.PROTOTYPER_TREES.CAVEMACHINE
    

     

    CCS.zip

    thank you! it works 


  6. I've made a custom structure, placeholder name is "Cave Machine", and when built lets you access the "CaveTech" tech tree, along with the "CaveTab" crafting tab. I've followed guides, everything of the sort. I'll attach the entire mod to this thread, but here are the key lines of code.

    Spoiler

     

    So I've used the "custom_tech_tree" api thing, in my modmain is this.

    
    modimport "custom_tech_tree.lua"
    AddNewTechTree("CAVETECH")
    local CaveTab = AddRecipeTab("Cave", 10, "images/cavetab.xml", "cavetab.tex")
    STRINGS.TABS.CAVETAB="Cave"

    In the cavemachine prefab, is this

    
        inst:AddComponent("prototyper")
        inst.components.prototyper.trees = TUNING.PROTOTYPER_TREES.CAVETECH

    an example for a recipe,

    
    AddRecipe("lightbulb", { Ingredient("petals", 6), Ingredient("flint", 2) }, 
    RECIPETABS.CAVETAB, 
    TECH.CAVETECH, 
    nil, nil, true, 6)
    

     

     

     

    here is the error from the crash log, it doesn't reference any of my code or any of my files, so I am kinda stumped.

    Spoiler

    [00:00:58]: [string "scripts/components/builder.lua"]:191: attempt to index field 'accessible_tech_trees' (a nil value)
    LUA ERROR stack traceback:
    scripts/components/builder.lua:191 in (method) EvaluateTechTrees (Lua) <135-243>
       self =
          exclude_tags = table: 61A79D68
          buffered_builds = table: 61A79CF0
          current_prototyper = 114738 - cavemachine (valid:true)
          recipes = table: 61A793B8
          station_recipes = table: 670E0CA0
          bonus_tech_level = 0
          inst = 109283 - wilson (valid:true)
          _ = table: 61A886D8
       pos = (77.60, 0.00, 98.87)
       ents = table: 670E0A98
       old_accessible_tech_trees = table: 670E0C00
       old_station_recipes = table: 670E7708
       old_prototyper = nil
       prototyper_active = true
    scripts/components/builder.lua:108 in (method) OnUpdate (Lua) <107-109>
       self =
          exclude_tags = table: 61A79D68
          buffered_builds = table: 61A79CF0
          current_prototyper = 114738 - cavemachine (valid:true)
          recipes = table: 61A793B8
          station_recipes = table: 670E0CA0
          bonus_tech_level = 0
          inst = 109283 - wilson (valid:true)
          _ = table: 61A886D8
    scripts/update.lua:192 in () ? (Lua) <149-228>
       dt = 0.033333335071802
       tick = 614
       k = 109283
       v = 109283 - wilson (valid:true)
       cmp = table: 61A886B0

    [00:00:58]: [string "scripts/components/builder.lua"]:191: attempt to index field 'accessible_tech_trees' (a nil value)
    LUA ERROR stack traceback:
        scripts/components/builder.lua:191 in (method) EvaluateTechTrees (Lua) <135-243>
        scripts/components/builder.lua:108 in (method) OnUpdate (Lua) <107-109>
        scripts/update.lua:192 in () ? (Lua) <149-228>
     

    Any help would be  greatly appreciated! 

    Cave Content Surfaced.zip


  7. 4 hours ago, Serpens said:

    some of them are " = 1" , while others are "1 + random" or "random" or "1 or 2".
    So it is difficult to simply add + x to all of them, cause this will result in total mess ;)

    The code is from scripts/map/tasks forest.lua and DLCtasks.lua
    I think you can modify them with AddTaskPreInit / AddRoomPreInit in modmain.
    But if you want to replace them, you can also just override the forest.lua.

    This guide makes it seem pretty easy. As long as you remember to add in all the necessary stuff, like staticlayouts and set pieces, it should be good. and it'd be making a custom level, like world preset, obviously.


  8. 3 hours ago, Serpens said:

    what do you think should be changed?
    A task is added like this in the game:

      Hide contents
    
    
    AddTask("For a nice walk", {
    		locks={LOCKS.BASIC_COMBAT,LOCKS.TIER2},
    		keys_given={KEYS.POOP,KEYS.WOOL,KEYS.WOOD,KEYS.GRASS,KEYS.TIER2},
    		room_choices={
    			["BeefalowPlain"] = 1,
    			["MandrakeHome"] = function() return 1 + math.random(SIZE_VARIATION) end,
    			--["Wormhole"] = 1,
    			["DeepForest"] = function() return 1 + math.random(SIZE_VARIATION) end, 
    			["Forest"] = function() return math.random(SIZE_VARIATION) end, 
    		},
    		room_bg=GROUND.FOREST,
    		background_room="BGForest",
    		colour={r=1,g=0,b=1,a=1}
    	}) 
    
    
    AddTask("Badlands", {
    		locks={LOCKS.ADVANCED_COMBAT,LOCKS.MONSTERS_DEFEATED,LOCKS.TIER4},
    		keys_given={KEYS.HOUNDS,KEYS.TIER5, KEYS.ROCKS},
    		room_choices={
    			["DragonflyArena"] = 1,
    			["Badlands"] = 2,
    			["HoundyBadlands"] = function() return (math.random() < 0.33) and 2 or 1 end,
    			["BarePlain"] = 1,
    			["BuzzardyBadlands"] = function() return (math.random() < 0.5) and 2 or 1 end,
    		},
    		room_bg=GROUND.DIRT,
    		background_room="BGBadlands",
    		colour={r=1,g=0.6,b=1,a=1},
    	})

     

    that means that the area "For a nice walk" has BeefalowPlain, MandrakeHome, DeepForest and Forest (there are also 2 other tasks, that includes MandrakeHome), while all except BeefalowPlain have random size, depending on size_variation.

    What should a mod now change?
    Add + x to all four of them, to increase the "make a pick" area?
    Or just increase those that have a value unequal 1 by default?

    Or what?

    well, if possible, the mod would have all new tasks, with only 1 biome (or room), so you could configure the size of that one biome directly.


  9. Simple enough, I thought inst:ListenForEvent("onpickedfn", OnPicked) would be called whenever a flower is picked, because in the flower's prefab there is inst.components.pickable.onpickedfn = onpickedfn, but my OnPicked function never gets run. I know because there is a print statement immediately in the function. Is there another event to listen for, or something else I can do to know when a flower gets picked? 


  10. 9 hours ago, Serpens said:

    planting flowers is a good idea, thanks :)
    Do you also have a good story or "reason" for this? I mean things the pigking could say?
    I thought about a "storyline" like the pigking wants to expand his kingdom or whatever. And therefore you have to fullfill different tasks in order. First plant some flowers, then build some pighouses and then walls and so on.
    With that story around those quests, they get more interesting I hope.

    I'm sure there is an event that is fired, when something is cooked, so yes I can check what is cooked, thx

    Well, there can be maybe 3 Quests for the story, the King recruiting you, you do X for the King, you do a final quest.

    In between these quests though, there are a number of smaller radiant quests. So for example:

    Spoiler

    You meet the pig king for the first time. He asks for you help to build up his village. You say yes. 

    he gives you a radiant quest to build walls,

    and then a radiant quest to build houses,

    and then a radiant quest to feed pigmen meat.

    After a few radiant quests, he says that there have been some evil pigs doing some evil things somewhere, and asks you to destroy their statue. You go and do that.

    Then more radiant quests and more radiant quests and more...

    Then after those, you get the final quest, which is something like "Defend the village from a Varg attack" or something equally difficult.

    After you finish the final quest, he just gives you radiant quests forever.

    This is how I imagine all Quest Givers to be, with a few Main-Quest-Line quests, and radiant quests in between.


  11. On 3/15/2017 at 8:15 AM, SuperDavid said:

    I just wanna say your code is amazing, it makes the character completely mute in both speech & text, exactly what I needed :D!!!!! Thanks so, so much @PanAzej :D!!!!

    would you mind sharing with me the code you ended up with? I'm not sure what variable to put for "some_variable_that_makes_the_character_not_talk". And this would go into the character's prefab, or modmain?