Jump to content

stuck1a

Member
  • Posts

    51
  • Joined

  • Last visited

Contact Methods

  • Website URL
    stuck1a.de // kiebel.de

Profile Information

  • Gender
    Man
  • Interests
    Countless

Recent Profile Visitors

1154 profile views

stuck1a's Achievements

  1. Yeah simply use an invisible tile (like the one in the sheet invisible_01) and add the property TileBlockStyle = solid or solidTransparent
  2. I've searched a workaround solution for this for about 2 weeks when I've tried to add a own socket for a dev mod with a adjusted mobdebug to allow Java + Lua debugging through EmmyLua. Honestly, there is none way rather than manual installation or distribute a own patcher.
  3. Afaik not. but tools like CartoZed, the TilePyramid etc helps a lot. If you go to the Ingame Map in debug mode and enable "Features" and "TilePyramid" you can see at least the Floor Tiles relativley precisely and the world map zones. You can see zones with the Chunk Debugger and all objects in their layered order as well. But yes, it's very time consumpting, and you can't be shure, that the vanilla lot will get changes in the future. It's a pity, that we don't have access to the vanilla "Muldraugh, KY" TMX and PZW files... it would allow mappers to create modified map variants in no time in the best possible quality. Dunno if TIS theirself even have actual TMX/PZW files for all cells, since their Tile Editors had changes a lot over the years and they would have to update each Lot. // Ah, forget to mention: TIS recreated and released many of their vanilla buildings as TBX files matching the current Edtiors requirements, so you can simply import them. Rebuilding every building would be the hell, so this is great. Big probs to TIS for doing this. You can find the package here in the forum.
  4. Just stumbled over a small zone error while recreating a road within cell 41,23 The street polygon increases, with the same street width
  5. Point = 0D (e.g. SpawnPoints) Line = 1D (e.g. Nav zones used for zombie path finding) Polygon = 2D (e.g. rectangles, vertices) Ideally, you should prefer several small rectangles to complex polygons, as this should usually be more performant. Polygons, on the other hand, are useful for non-orthogonal areas (non-orthogonal roads, etc.) Because of the worldmap.xml.bin file... I haven't checked the source code, but I could imagine that the engine will check if there is a binary variant and if so, use that instead of the XML file, which is then only used as a fallback. At least that would make sense, since the XML files get pretty big quickly. If it's not used, well... the only benefit of omitting the file would be some hard drive space saved. So I'd say better safe than sorry, since every bit of RAM counts for multiplayer servers.
  6. How embarrassing... I could have figured that out myself, the Java code is pretty clear. Thanks a lot for your help! Now everything works as excepted.
  7. This is the source of those functions public void Remove(InventoryItem inventoryItem) { for ( int i=0; i < this.Items.size(); ++i ) { InventoryItem _item = (InventoryItem)this.Items.get(i); if ( _item == inventoryItem ) { if ( inventoryItem.uses > 1 ) --inventoryItem.uses; else this.Items.remove(inventoryItem); inventoryItem.container = null; this.drawDirty = true; this.dirty = true; if ( this.parent != null ) this.dirty = true; if ( this.parent instanceof IsoDeadBody ) ((IsoDeadBody)this.parent).checkClothing(inventoryItem); if ( this.parent instanceof IsoMannequin ) ((IsoMannequin)this.parent).checkClothing(inventoryItem); return; } } } public void DoRemoveItem(InventoryItem inventoryItem) { this.drawDirty = true; if ( this.parent != null ) this.dirty = true; this.Items.remove(inventoryItem); inventoryItem.container = null; if ( this.parent instanceof IsoDeadBody ) ((IsoDeadBody)this.parent).checkClothing(inventoryItem); if ( this.parent instanceof IsoMannequin ) ((IsoMannequin)this.parent).checkClothing(inventoryItem); } So DoRemoveItem() simply deletes the item regardless of its type, while Remove() checks if it is a drainable and if so, it subtracts only one consumption unit from it. Any none-drainables will be deleted, too. Also Remove() uses a loop which seems unecessary since ArrayList.remove() won't throw an error if the argument is not present in it, so I guess, this is a deprecated method which just remains for backwards compat for mods since you can use the usedDelta etc now for drainables If so, you should prefer DoRemoveItem() for the sake of performance. But tbh, that's just a guess based on the code
  8. There is a typo at your items script at line 9 item_realreloading_BrassSmithVictoryPress this typo continues at several recipes
  9. Some map tune scripts I use in my workflow: #!/usr/bin/php <?php /********* OPTIONS ***********/ const TILES_PER_CELL = 300; const BOUND_PADDING = 10; /*****************************/ $xmin = null; $ymin = null; $xmax = null; $ymax = null; $cells = []; if ( !$argv || !$argv[1] || $argv[1] == '' ) { echo 'Missing argument'; exit(1); } if ( !file_exists($argv[1]) ) { echo "File {$argv[1]} not found"; exit(1); } $xml = file_get_contents($argv[1]); $xml = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA); foreach ( $xml as $elem ) { if ( $elem->getName() == 'cell' ) { $cells[] = $elem; } } foreach ( $cells as $cell ) { foreach ( $cell->attributes() as $name => $value ) { if ( $name == 'x' ) { $current = (int)$value * TILES_PER_CELL; foreach ( $cell->children() as $feature ) { if ( $feature->getName() == 'feature' ) { foreach ( $feature->children() as $geometry ) { if ( $geometry->getName() == 'geometry' ) { foreach ( $geometry->children() as $coordinates ) { if ( $coordinates->getName() == 'coordinates' ) { foreach ( $coordinates->children() as $point ) { if ( $point->getName() == 'point' ) { foreach ( $point->attributes() as $key => $val ) { if ( $key == 'x' ) { if ( $xmax == null || $xmax < $current + $val ) { $xmax = $current + $val; } if ( $xmin == null || $xmin > $current + $val ) { $xmin = $current + $val; } } } } } } } } } } } } elseif ( $name == 'y' ) { $current = (int)$value * TILES_PER_CELL; foreach ( $cell->children() as $feature ) { if ( $feature->getName() == 'feature' ) { foreach ( $feature->children() as $geometry ) { if ( $geometry->getName() == 'geometry' ) { foreach ( $geometry->children() as $coordinates ) { if ( $coordinates->getName() == 'coordinates' ) { foreach ( $coordinates->children() as $point ) { if ( $point->getName() == 'point' ) { foreach ( $point->attributes() as $key => $val ) { if ( $key == 'y' ) { if ( $ymax == null || $ymax < $current + $val ) { $ymax = $current + $val; } if ( $ymin == null || $ymin > $current + $val ) { $ymin = $current + $val; } } } } } } } } } } } } } } $xmin -= BOUND_PADDING; $ymin -= BOUND_PADDING; $xmax += BOUND_PADDING; $ymax += BOUND_PADDING; echo "\n\nXML cell analysis done!\n"; echo "(xmin, ymin, xmax, ymax) = ${xmin}, ${ymin}, ${xmax}, ${ymax}\n"; exit(0); ?> You can use it in IDEA from context menu when right click a worldmap.xml file by using a remote tool config like this: And this lua script can be used to convert spawnpoint entries into the objects.lua format: spawnpoints = { unemployed = { { worldX = 26, worldY = 39, posX = 274, posY = 31, posZ = 0 }, { worldX = 27, worldY = 38, posX = 108, posY = 200, posZ = 0 }, { worldX = 27, worldY = 38, posX = 146, posY = 270, posZ = 0 }, { worldX = 27, worldY = 39, posX = 227, posY = 114, posZ = 0 }, { worldX = 28, worldY = 38, posX = 18, posY = 286, posZ = 0 }, } } for profession, entries in pairs(spawnpoints) do local prof = tostring(profession) if prof == 'unemployed' then prof = 'all' end for _, v in pairs(entries) do print("{ name = '', type = 'SpawnPoint', x = "..v.worldX*300+v.posX..", y = "..v.worldY*300+v.posY..", z = "..(v.posZ or "0")..", width = 1, height = 1, properties = { Professions = '"..prof.."' } },") end end // Btw: is there any documentation about the lot* binaries? Or can anyone provide me with some informationen about their structure? I'd like to write a script to generate missing worldmap.xml files from them, because there are some nice maps made with much time and love but without worldmap.xml, which is a pity, because of course it massively reduces the quality of that map.
  10. Isn't there such a feature implemented? Though I just saw something similar in the RCON interface, a command called record start|stop|play or something like this when I had planned the cutscene feature for my current project. Never used or tried it, but it sounds like this is what you are looking for. Otherwise, my first approach would be to wrap the appropriate event listeners. There you can check whether it is the target character and if not, delegate the execution flow to wrapped function. // Because of the remaining shadows: Maybe you can check the tile of those squares and overlay/stamp it over the shadow. Well again, this is a situation where I think something like a force re-render function for IsoGridSquare on Java layer would be a nice thing... But maybe there are some shader functions exposed to lua as well. Should be worth checking/trying
  11. Guess the mod is simply buggy/outdated
  12. Hi there, I have a map mod with multiple map directories. However, I would like to define my own collection of spawn points as several spawn regions, so I've added three more Map Directories which each represent one of such spawn regions. The spawn regions are displayed and basically works, but neither the description text nor the thumbnail are displayed in multiplayer. But it works fine in single player. I was at least able to translate the titles with a custom solution. But I guess, this should be possible by the core logic itself. This is my folder structure: map.info title=Green Zone lots=Muldraugh, KY description=Initial Description Green Zone fixed2x=true description.txt Übersetzte Beschreibung für grüne Zonen title.txt (1) Starte in einer grünen Zone objects.lua (shortened for better readability) objects = { { name = "", type = "SpawnPoint", x = 10916, y = 10133, z = 0, width = 1, height = 1, properties = { Professions = "all" } }, { name = "", type = "SpawnPoint", x = 10803, y = 10073, z = 0, width = 1, height = 1, properties = { Professions = "all" } }, { name = "", type = "SpawnPoint", x = 10919, y = 10132, z = 0, width = 1, height = 1, properties = { Professions = "all" } }, -- ... } spawnpoints.lua function SpawnPoints() return { unemployed = { { worldX = 36, worldY = 33, posX = 116, posY = 233, posZ = 0 }, { worldX = 36, worldY = 33, posX = 3, posY = 173, posZ = 0 }, { worldX = 36, worldY = 33, posX = 119, posY = 232, posZ = 0 }, } } end DebugServer_spawnregions.lua function SpawnRegions() return { { name = '(1) Green Zone', file = 'media/maps/GartenEdenSpawnsGreenZone/spawnpoints.lua' }, { name = '(2) Yellow Zone', file = 'media/maps/GartenEdenSpawnsYellowZone/spawnpoints.lua' }, { name = '(3) Red Zone', file = 'media/maps/GartenEdenSpawnsRedZone/spawnpoints.lua' } } end Rendered Result: ____________ My workaround to get at least the names translated I've added an file spawnregions.txt to my map mods Translate dir as follows: return { ['EN'] = { GreenZone = '(1) Start in a green zone', YellowZone = '(2) Start in a yellow zone', RedZone = '(3) Start in a red zone', }, ['DE'] = { GreenZone = '(1) Starte in einer gr\195\188nen Zone', YellowZone = '(2) Starte in einer gelben Zone', RedZone = '(3) Starte in einer roten Zone', } } And modified my DebugServer_spawnregions.lua as follows: function SpawnRegions() local activeLang = getCore():getOptionLanguageName() local sGreenZone = '(1) Start in a green zone' local sYellowZone = '(2) Start in a yellow zone' local sRedZone = '(3) Start in a red zone' local translationTable = {} if getActivatedMods():contains('GartenEdenMaps') then local file = getModFileReader('GartenEdenMaps', 'media/lua/shared/Translate/spawnregions.txt', false) if file then local scanline = file:readLine() local content = scanline and '' or 'return {}' while scanline do content = content .. scanline .. '\n' scanline = file:readLine() end file:close() translationTable = loadstring(content)() if translationTable[activeLang] ~= nil then sGreenZone = translationTable[activeLang].GreenZone or sGreenZone sYellowZone = translationTable[activeLang].YellowZone or sYellowZone sRedZone = translationTable[activeLang].RedZone or sRedZone end end end return { { name = 'Muldraugh, KY', file = 'media/maps/Muldraugh, KY/spawnpoints.lua' }, -- just as reference { name = sGreenZone, file = 'media/maps/GartenEdenSpawnsGreenZone/spawnpoints.lua' }, { name = sYellowZone, file = 'media/maps/GartenEdenSpawnsYellowZone/spawnpoints.lua' }, { name = sRedZone, file = 'media/maps/GartenEdenSpawnsRedZone/spawnpoints.lua' } } end So I was able to get this result: In singleplayer it looks like follows: (just borrowed image of bedford to ensure the image file isn't the problem) So what the heck do I wrong? Thanks in advance, stuck1a
  13. Didn't find time yesterday. Just played around a bit - it seems like simply re-rendering isn't possible (only with many detours), so I think re-creating the object should be the better way. You could try to re-use existing object, so you don't have to construct a new one. Here is a quck and dirty example: local OnKeyPressed = function(key) local oPlayer = getSpecificPlayer(0) local oSquare = oPlayer:getSquare() -- set some dummy structures for testing (Key R) if key == 19 then local ISChair = ISSimpleFurniture:new('Wooden Chair', 'carpentry_01_36', 'carpentry_01_36') ISChair:create(oSquare:getX(), oSquare:getY(), oSquare:getZ(), false, 'carpentry_01_36') local ISTable = ISSimpleFurniture:new('Small Table with Drawer', 'carpentry_02_0', 'carpentry_02_0') ISTable:create(oSquare:getX(), oSquare:getY(), oSquare:getZ(), false, 'carpentry_02_0') end -- switch objects (Key U) if key == 22 then local aObjects = oSquare:getObjects() local oFoundChair local oFoundTable -- check if we have the two objects on the square, we want to switch for i=0, aObjects:size() do local oCurr = aObjects:get(i) if instanceof(oCurr, 'IsoThumpable') then if oCurr:getName() == 'Wooden Chair' then oFoundChair = oCurr elseif oCurr:getName() == 'Small Table with Drawer' then oFoundTable = oCurr end end end -- now remove the existing chair and re-create it in front by using the stored object pointer if oFoundChair and oFoundTable then oSquare:transmitRemoveItemFromSquare(oFoundChair) oSquare:AddSpecialObject(oFoundChair) oFoundChair:transmitCompleteItemToServer() end end end Events.OnKeyPressed.Add(OnKeyPressed)
  14. This are some nice idea's, but honestly my opinion is: keep things simple. It's feels a bit like overtaxing the farming feature as it is a zombie survival game. Farming already yields so much food pretty quickly that you have to compost most of it or it will rot. Keeping 2-3 squares will provide you with more than enough food already. With such improvements, you could probably supply yourself completely with a single farming square, so this would be very hard to balance. This mushroom thing sounds interesting, too, but the game doesn't differentiate between mushrooms. There are a handful of "mushrooms" with different sprites and when a world is created, a couple of them will be randomly chosen as poisonous. So that seems difficult to reconcile with the existing game logic. Since livestock farming was introduced, maybe the greenhouse thing could be a nice thing to be able to maintain the food supply for the animals in winter. Maybe as an farmer profession special recipe or something like that. but: Even if I personally reject the idea for a vanilla implementation, this might be some nice features for an "advanced farming" mod. I'm sure, there are suitable servers which would use it. Maybe you could develop a mod that implements these ideas. In case of doubt, this would also act a proof of concept regarding the balancing.
  15. Hey TheZ, As soon as I get out of the office I'll see if I can come up with a decent solution.
×
×
  • Create New...