endev15 wrote:Thanks, I'll read that over several times and make sure I understand. paramat pointed me to use the new LBMs, so I'll probably try and apply some of the above to them.
OldCoder wrote:endev15 wrote:Thanks, I'll read that over several times and make sure I understand. paramat pointed me to use the new LBMs, so I'll probably try and apply some of the above to them.
LBMs may be all that you need.
The approach that I outlined isn't necessarily recommended for general applications. It's what I used in "codersea", though, and may be suitable for some purposes.
endev15 wrote:I honestly don't quite get LBMs; they seem pretty well the same as ABMs to me, though I do see that they seem more general. I also understand that they only run at startup, but that's the only difference I see.




init.lua               - The mod's Lua code, presented below
depends.txt            - The mod's dependency file, also presented below
sounds/cloud_ouch.ogg  - A sound file, included in the ZIP file
textures/loudcloud.png - A PNG texture file, included in the ZIP file
-- "depends.txt" should list the "bacon" mod.
-- If the "bacon"  mod  is  present,  this  code
-- sets  "cloud_drop" to "bacon:cooked".  Other-
-- wise, "cloud_drop" is left as "default:wood".
local cloud_drop  = "default:wood"
local prefer_drop = "bacon:cooked"
if minetest.registered_items [prefer_drop] then
    cloud_drop = prefer_drop
end                    
-- This code registers a  cloud node  that  says
-- "ouch" when somebody punches it, that can  be
-- broken by hand, and  that drops  cooked bacon
-- when it's broken.
-- The cloud tile is simply a copy of  "default_
-- cloud.png",  which comes  with minetest_game.
-- The PNG file should be  placed in a subdirec-
-- tory of the mod directory named "textures".
-- The sound file is an  Ogg-format  sound  clip
-- obtained from the Web and renamed to  "cloud_
-- ouch.ogg".  The  ".ogg"   filename  extension
-- should be omitted in the Lua code. The ".ogg"
-- file itself should be placed in  a  subdirec-
-- tory of the mod directory named "sounds".
minetest.register_node ("loudcloud:cloud" , {
    description = "Loud Cloud"          ,
    tiles = { "loudcloud.png" }         ,
    is_ground_content     = false       ,
    drop                  = cloud_drop  ,
    paramtype2            = "facedir"   ,
    groups                = {
        choppy                  = 3 ,
        cracky                  = 2 ,
        oddly_breakable_by_hand = 2 ,
    } ,
    legacy_facedir_simple = true        ,
    sounds = {
        dig  = "cloud_ouch" ,
        gain = 0.20         ,
    }                                   ,
})

sparky wrote:Is this compatible with 3d_armor?
stu wrote:1. The multi-format model approach is unlikely to be accepted in MTG due to its excessive file size but I could be wrong. 2. I personally support the idea of a clean upgrade as older skins can be easily converted to the new format and are pretty much obsolete now anyway. 3. I might also point out that the model in this patch-set will not work with my wield3d mod due to attachment problems with directx and the aforementioned changes to the armature.
OldCoder wrote: The patchset adds just 30 KB to the size of "character.x".
stu wrote:Last I checked, Jordach's model was approx 350k vs 85k for the current b3d player model, those kb's will quickly add up on a busy server. But don't get me wrong, I am not knocking what you are doing here, unfortunately, there is no easy way for me to support these changes in the 3d_armor mod or I would.
OldCoder wrote:stu wrote:Last I checked, Jordach's model was approx 350k vs 85k for the current b3d player model, those kb's will quickly add up on a busy server. But don't get me wrong, I am not knocking what you are doing here, unfortunately, there is no easy way for me to support these changes in the 3d_armor mod or I would.
I'm not sure that I follow. There should be only one of these models per "_game", shouldn't there? Are you referring to RAM usage as opposed to disk space?
Thanks for the remarks, regardless.

rm -fr lib_mount lib_mount-master master.zip
wget https://github.com/blert2112/lib_mount/archive/master.zip
unzip master.zip && rm master.zip
mv lib_mount-master lib_mount
rm -fr vehicle_mash vehicle_mash-master master.zip
wget https://github.com/blert2112/vehicle_mash/archive/master.zip
unzip master.zip && rm master.zip
mv vehicle_mash-master vehicle_mash
rm -fr vehicles vehicles-master master.zip
wget https://github.com/D00Med/vehicles/archive/master.zip
unzip master.zip && rm master.zip
mv vehicles-master vehicles


Users browsing this forum: No registered users and 5 guests