SenL Posted February 1, 2015 Share Posted February 1, 2015 Host is "webweb" and I'm joining his server as mychar (my mod).Screen is black. 3 times (disconnect->rejoin). Then messed up screen 2 times (see screenshot attached).I can't find anything wrong in the log... (searched for "error").What's going on my my char mod... Note that if host is mychar also then everything is normal. Link to comment Share on other sites More sharing options...
SenL Posted February 1, 2015 Author Share Posted February 1, 2015 (edited) Also when both host and client are mychar, sometimes the client is unable to craft anything (it would consume ingredients but then nothing happens).Weird bugs start happening...Edit:Client disconnected and relogged and the item is already there, ready to be placed (it's science machine).Weird! Edited February 1, 2015 by SenL Link to comment Share on other sites More sharing options...
rezecib Posted February 2, 2015 Share Posted February 2, 2015 @SenL, Looks like recipe tables on the client and host being different, causing cascading bugs with player_classified. If you're specifying any recipes inside your character's prefab, you can't do that in DST anymore without causing stuff like this. Link to comment Share on other sites More sharing options...
SenL Posted February 2, 2015 Author Share Posted February 2, 2015 Yes I have some recipes inside mychar.lua under common_postinit.How should we do recipes now? Link to comment Share on other sites More sharing options...
rezecib Posted February 2, 2015 Share Posted February 2, 2015 @SenL, Look at DST RoG Characters. It has to be in the modmain, and you have to modify some other stuff to get it to be character-specific. Link to comment Share on other sites More sharing options...
SenL Posted February 2, 2015 Author Share Posted February 2, 2015 (edited) Thanks. Ok, I looked at your wathgrithr and webber in that mod (http://steamcommunity.com/sharedfiles/filedetails/?id=356833566&searchtext=RoG) then I modified mine. It crashes when I scroll down my "war" (fight) recipe tabs. log:[00:53:01]: WARNING! Could not find region 'OUTOFSPACE' from atlas 'images/inventoryimages.xml'. Is the region specified in the atlas?[00:53:01]: Looking for default texture '(null)' from atlas 'images/inventoryimages.xml'.[00:53:01]: images/inventoryimages.xmlLUA ERROR stack traceback: scripts/widgets/image.lua(30,1) in function 'SetTexture' scripts/widgets/recipetile.lua(25,1) in function 'SetRecipe' I don't even have "images/inventoryimages.xml" mentioned anywhere. my modmain.lua:...if not GLOBAL.TheNet:IsDedicated() then local OldIsRecipeValid = GLOBAL.IsRecipeValid local function IsRecipeValid(recipe) return OldIsRecipeValid(recipe) and ((GLOBAL.ThePlayer and GLOBAL.ThePlayer:HasTag(recipe.name.."_builder")) or not recipe.tagneeded) end GLOBAL.IsRecipeValid = IsRecipeValidend local Recipe = GLOBAL.Recipelocal RECIPETABS = GLOBAL.RECIPETABSlocal TECH = GLOBAL.TECH local recipes ={ Recipe("myitem", {Ingredient( ... ), RECIPETABS.TOOLS, {SCIENCE=1}),}... Inside mychar.lua, under master_postinit: ...inst:AddTag("myitem_builder")... I had to comment out below (in mychar.lua under common_postinit) ...local myitem_recipe = Recipe("myitem", {Ingredient ... }, RECIPETABS.TOOLS, {SCIENCE=1})myitem_recipe.atlas = resolvefilepath("images/inventoryimages/myitem.xml")... I still have these in my myitem.lua: ...inst.components.inventoryitem.imagename = "myitem"inst.components.inventoryitem.atlasname = "images/inventoryimages/myitem.xml"... Edited February 2, 2015 by SenL Link to comment Share on other sites More sharing options...
rezecib Posted February 2, 2015 Share Posted February 2, 2015 I don't even have "images/inventoryimages.xml" mentioned anywhere. From your description, it's crashing when it tries to load the recipe tile for your recipe. It also uses inventoryimages for the crafting tile (you can look in inventoryimages.tex and you'll see campfires and such, which are not actually inventory items). So you need to be setting the recipe's atlas as well. You can probably do something like this if your xmls are all named accordingly:local recipes = { Recipe("myitem1", {...}, RECIPETABS.TOWN, TECH.NONE), Recipe("myitem2", {...}, RECIPETABS.WAR, {SCIENCE = 0, MAGIC = 0, ANCIENT = 0}, nil, nil, nil, nil, true), Recipe("myitem3", {...}, RECIPETABS.WAR, {SCIENCE = 0, MAGIC = 0, ANCIENT = 0}, nil, nil, nil, nil, true),}for k,v in pairs(recipes) do v.tagneeded = true v.atlas = "images/inventoryimages/"..v.name..".xml"endIn this case, it works on the assumption that your xmls are named "myitem1.xml", "myitem2.xml", etc. Link to comment Share on other sites More sharing options...
SenL Posted February 2, 2015 Author Share Posted February 2, 2015 (edited) No more crashes, but it doesn't show in recipe tab either, haha.Is it something with "IsRecipeValid"? Mychar already has tag "myitem_builder" Edit:I changed tagneeded=false and now it shows up.So something with below doesn't click ((GLOBAL.ThePlayer and GLOBAL.ThePlayer:HasTag(recipe.name.."_builder")) Edited February 2, 2015 by SenL Link to comment Share on other sites More sharing options...
SenL Posted February 2, 2015 Author Share Posted February 2, 2015 (edited) The good news is now the screen is normal when I join as mychar (as client) to a host that is not mychar.Haven't tested thoroughly (only 1 minute since I gotta go) for crashes though - tomorrow will test more.I do still need help on that tagneeded=true -> not showing up in recipe tabs. Thanks rezecib! Edited February 2, 2015 by SenL Link to comment Share on other sites More sharing options...
rezecib Posted February 2, 2015 Share Posted February 2, 2015 I do still need help on that tagneeded=true -> not showing up in recipe tabs. Setting tagneeded = true will make it not show up in the recipe tabs unless the character has the "recipe_builder" tag (e.g. "spidereggsack_builder" to be able to see the spider egg recipe). Link to comment Share on other sites More sharing options...
SenL Posted February 2, 2015 Author Share Posted February 2, 2015 But I already have it, in the master_postinit: inst:AddTag("myitem_builder") Link to comment Share on other sites More sharing options...
SenL Posted February 2, 2015 Author Share Posted February 2, 2015 (edited) I moved the "_builder" line up (all the way up, but still inside master_postinit) and restarted (deleted and recreated server room) and it works now. Hm. Weird, but now it's all fixed. Thanks!! Edit: Ok I forgot that I still have the tagneeded=false.Will flip it to true and retest later in the afternoon. Edited February 2, 2015 by SenL Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now