[Mod] Throwing [0.13] [throwing]

User avatar
Calinou
Moderator
Posts: 3162
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

by Calinou » Post

ZIP isn't horrible, Hackeridze... It's lossless but proprietary (see other opensource games - 512×512 textures in PNG are twice as large as JPG for the same size).

User avatar
Temperest
Member
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Post

Bug report: MineTest 20120106 build @ Windows 7, 32-bit.

Use the bow to fire multiple arrows. Upon landing, only one arrow can be collected. Sometimes the bow does not fire any arrows at all, even though they are present in the inventory.

This did not happen in the previous build, 20120102.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.

User avatar
randomproof
Member
Posts: 214
Joined: Thu Nov 17, 2011 06:31
Location: California, USA

by randomproof » Post

Zarberman wrote:i dont have a mac or linux and i cant install programs because my computer will not let me so i need .zip
Just for in the future you can get a portable version of 7-Zip here. It doesn't need to be installed and should be able to open anything.

User avatar
Baŝto
New member
Posts: 9
Joined: Fri Jan 06, 2012 13:46
Location: Hesse

by Baŝto » Post

Zarberman wrote:i dont have a mac or linux and i cant install programs because my computer will not let me so i need .zip
How did you install minetest-c55?

User avatar
jordan4ibanez
Member
Posts: 1895
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez
Location: Rhode Island, USA

by jordan4ibanez » Post

done a review on it
I've been gone for a long time

Jordach
Member
Posts: 4523
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

by Jordach » Post

does not work for newest windows build.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Post

OK, let me try to update it....
Redstone for minetest: Mesecons (mesecons.net)

Jordach
Member
Posts: 4523
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

by Jordach » Post

it just crashed becuase of some reason,

to remove blocks or arrows stuck in blocks at crash:

ensure you have dynamite by nemo08 installed (does work)

set the tnt against the unknown block/tool then run.

the item will blow up and cannot be recovered, this happened to another mod, and currently is the only way to kill it, mining does not work either.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Post

???
This has nothing to do with nemo08's dynamite mod. I know what's wrong and I'm fixing it.
Redstone for minetest: Mesecons (mesecons.net)

Jordach
Member
Posts: 4523
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

by Jordach » Post

although its good for killing those damn unknown blocks.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Post

oh thats what you meant...
btw I updated the mod > wait a few minutest until uploaded
Last edited by Jeija on Fri Jan 27, 2012 21:17, edited 1 time in total.
Redstone for minetest: Mesecons (mesecons.net)

User avatar
rahonejm
Member
Posts: 88
Joined: Wed Dec 28, 2011 01:58
Location: Brazil

by rahonejm » Post

Bugged on the latest version :( The game shuts when you shot...
Sorry for possible language mistakes

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Post

The latest mod version 0.13 works for me with the latest minetest version.
Redstone for minetest: Mesecons (mesecons.net)

User avatar
dannydark
Member
Posts: 428
Joined: Fri Aug 12, 2011 21:28
Location: Manchester, UK

by dannydark » Post

rahonejm wrote:Bugged on the latest version :( The game shuts when you shot...
hmmm, Works for me on the latest build.

What does your debug.txt say?

EDIT: @Jeija I did a bit of cleaning on this mod as there was still some output strings that where formatted the old way, not that it caused any problems just thought I would fix the formatting ^_^ I've added it here: http://pastebin.com/q47eYQTR if your interested.
Last edited by dannydark on Fri Feb 10, 2012 18:39, edited 1 time in total.

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Post

I uploaded this mod to github:
https://github.com/Jeija/minetest-mod-throwing.
I also commited your changes, dannydark! If anyone wants to have acces on GitHub, tell me your username!
Redstone for minetest: Mesecons (mesecons.net)

kahrl
Member
Posts: 236
Joined: Fri Sep 02, 2011 07:51
Location: Rös̓̇chenhof

by kahrl » Post

Two things I noticed about the register_craftitem calls:
1. "image" is deprecated since 20120122, use "inventory_image"
2. "on_place_on_ground" and minetest.craftitem_place_item have been deleted, you can simply remove those.

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Post

Kahrl, I commited your changes. Thx :D
Last edited by Jeija on Fri Feb 10, 2012 20:27, edited 1 time in total.
Redstone for minetest: Mesecons (mesecons.net)

User avatar
MirceaKitsune
Member
Posts: 867
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest
Contact:

by MirceaKitsune » Post

This is a very nice mod! Seems to work a lot like the MC bow as well. This one I hope will be included as part of the default mod and Minetest.

Image

Only objection is the crafting pattern for the bow. Instead of using planks there, I believe using sticks would be more appropriate. Otherwise, looks excellent and I'll try it out soon :)

Jordach
Member
Posts: 4523
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

by Jordach » Post

MirceaKitsune wrote:This is a very nice mod! Seems to work a lot like the MC bow as well. This one I hope will be included as part of the default mod and Minetest.

Image

Only objection is the crafting pattern for the bow. Instead of using planks there, I believe using sticks would be more appropriate. Otherwise, looks excellent and I'll try it out soon :)
Yeah, but it crashes on the newest dev for some reason.

And well done for saying default and not upstream, celeron says default is right and upstream is wrong. :)
viewtopic.php?f=10&t=19056 Solar Plains Dev Server

User avatar
cyberslayer
Member
Posts: 28
Joined: Wed Feb 15, 2012 19:27

by cyberslayer » Post

you make the best mods ever. you should ask celeron55 to inplent this and the redstone mod and maybye even the nyan cat one =D

User avatar
randomproof
Member
Posts: 214
Joined: Thu Nov 17, 2011 06:31
Location: California, USA

by randomproof » Post

I was having a problem with arrows hitting another arrow on the ground and disappearing So I fixed the code a little. Basically, a craft item on the ground is an object entity that will be returned by 'get_objects_inside_radius' so the arrow adds damage to it and disappearing. This makes no sense so I added a check to make sure the object entity already has hit points before it attacks it. Also 'obj:get_entity_name()' is supposed to be DEPRECATED so I replaced that with the correct method.

Code: Select all

-- Arrow_entity.on_step()--> called when arrow is moving
THROWING_ARROW_ENTITY.on_step = function(self, dtime)
    self.timer=self.timer+dtime
    local pos = self.object:getpos()
    local node = minetest.env:get_node(pos)

    -- When arrow is away from player (after 0.2 seconds): Cause damage to mobs and players
    if self.timer>0.2 then
        local objs = minetest.env:get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2)
        for k, obj in pairs(objs) do
            if obj:get_luaentity() ~= nil then
                name = obj:get_luaentity().name
            else
                name = nil
            end
            if name ~= "throwing:arrow_entity" and obj:get_hp() > 0 then
                obj:set_hp(obj:get_hp()-ARROW_DAMAGE)
                if obj:get_hp()<=0 then 
                    obj:remove()
                end
                self.object:remove()
                return
            end
        end
    end

    -- Become item when hitting a node
    if self.lastpos.x~=nil then --If there is no lastpos for some reason
        if node.name ~= "air" then
            minetest.env:add_item(self.lastpos, 'throwing:arrow')
            self.object:remove()
            return
        end
    end
    self.lastpos={x=pos.x, y=pos.y, z=pos.z} -- Set lastpos-->Item will be added at last pos outside the node
end

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Post

Thanks a lot; I think I will upload the mod on GitHub and commit your changes.
Redstone for minetest: Mesecons (mesecons.net)

User avatar
Kexyl Redwake I
New member
Posts: 8
Joined: Sat Jun 02, 2012 18:55

by Kexyl Redwake I » Post

I put the unzipped folder, which contained the textures, the stuff needed for the mod, you know, into the mod folder. But when i went to run Minetest, it says that there's a problem loading the bow mod. Do I need to rename the folder or something?
"I reject your reality, and substitute my own!" ~ Adam Savage

User avatar
Temperest
Member
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Post

The folder must be named "throwing". Not "bow", not "shooting", "throwing". Any other name will not work.

Ensure that the init.lua file is directly inside this folder, and not in a subfolder.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.

User avatar
Kexyl Redwake I
New member
Posts: 8
Joined: Sat Jun 02, 2012 18:55

by Kexyl Redwake I » Post

Okay, thanks Temperest!
"I reject your reality, and substitute my own!" ~ Adam Savage

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest