[Mod] Car extension for StreetsMod (ALPHA)[cars]

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by webdesigner97 » Wed Sep 17, 2014 19:29

Rename the mod to "cars" :)
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by jordan4ibanez » Wed Sep 17, 2014 21:00

I have a few ideas for you.


-Brake wearing, as in when you hit the breaks, it depletes your brake life.
-Gasoline, a gasoline life bar
-An oil life bar, when you turn the engine on and idle, it could wear away at the life bar at 0.001, and steadily increase the wear up to 0.050 at max speed
-Combining the farming mod, you could have growable flax seeds
-A still to brew the flax seeds into motor oil and diesel
-Tire wearing, life bar for that
-Possibly have node boxes, and you could physically assemble the car in the world with different parts, then when you right click with a key it becomes an entity. And when you need to repair something, you could either use a gui, or right click with a wrench to turn it back into nodes, so you can fix something.

Nice mod!
 

User avatar
SAMIAMNOT
Member
 
Posts: 363
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by SAMIAMNOT » Wed Sep 17, 2014 22:00

I still have an error for the streets. What should I name the mod?
I test mines.
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by webdesigner97 » Thu Sep 18, 2014 14:50

SAMIAMNOT wrote:I still have an error for the streets. What should I name the mod?
webdesigner97 wrote:Rename the mod to "cars" :)

That should work.
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by webdesigner97 » Thu Sep 18, 2014 14:50

jordan4ibanez wrote:I have a few ideas for you.


-Brake wearing, as in when you hit the breaks, it depletes your brake life.
-Gasoline, a gasoline life bar
-An oil life bar, when you turn the engine on and idle, it could wear away at the life bar at 0.001, and steadily increase the wear up to 0.050 at max speed
-Combining the farming mod, you could have growable flax seeds
-A still to brew the flax seeds into motor oil and diesel
-Tire wearing, life bar for that
-Possibly have node boxes, and you could physically assemble the car in the world with different parts, then when you right click with a key it becomes an entity. And when you need to repair something, you could either use a gui, or right click with a wrench to turn it back into nodes, so you can fix something.

Nice mod!

Those are great ideas! I really love (most of) them! I'll keep them in mind when working on it again :)
 

User avatar
SAMIAMNOT
Member
 
Posts: 363
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by SAMIAMNOT » Fri Sep 19, 2014 01:40

webdesigner97 wrote:
SAMIAMNOT wrote:I still have an error for the streets. What should I name the mod?
webdesigner97 wrote:Rename the mod to "cars" :)

That should work.


I'm refferring to your streets mod. I renamed it streets and I still get an error.
PS why doesnt the download just have the right name?
I test mines.
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by webdesigner97 » Fri Sep 19, 2014 05:29

SAMIAMNOT wrote:
webdesigner97 wrote:
SAMIAMNOT wrote:I still have an error for the streets. What should I name the mod?
webdesigner97 wrote:Rename the mod to "cars" :)

That should work.


I'm refferring to your streets mod. I renamed it streets and I still get an error.
PS why doesnt the download just have the right name?

Please try this version. The downloads get different file names because Github always adds the main branch name to the archive name.
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by Topywo » Fri Sep 19, 2014 12:27

streets-master is a modpack. Afaik it doesn't need to be renamed. Maybe the renaming causes the conflict with streetcars?
 

chrisjose1913
Member
 
Posts: 56
Joined: Wed Nov 12, 2014 23:04
IRC: Hawksquawks
In-game: chrisjose1913

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by chrisjose1913 » Fri Nov 28, 2014 20:02

Hello It seems if i place more than one car down both will move as a drive, any fix ? as would like to use on my server.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by paramat » Sat Nov 29, 2014 05:18

Perhaps try my car mod, hopefully at least 3 can be driven independantly on a server, maybe unlimited i'm not sure.
https://forum.minetest.net/viewtopic.php?f=11&t=7967
There are other good car mods in the forum.
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by ABJ » Mon Apr 20, 2015 12:44

I wonder what this could have been.............

One day, I was driving in a melcar in a delicate city map with wool roads. And all of a sudden, well, I like to describe what happened next as my melcar blowing up, though there was no crater, but all of a sudden, I'm out of my car, the car has disappeared, and the entire street is on fire :( :D
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by webdesigner97 » Mon Apr 20, 2015 15:31

The car might habe disappeared, but it can never ever put the road on fire...
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by ExeterDad » Mon Apr 20, 2015 15:47

Although that would be a fun feature in the right game or server.
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by ABJ » Mon Apr 20, 2015 15:57

webdesigner97 wrote:The car might habe disappeared, but it can never ever put the road on fire...

Well the street was set on fire the precise moment the car "blew up". And I totally doubt anything else present on the scene could have set that much of street on fire that way. So the evidence points to the car.
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by ABJ » Mon Apr 20, 2015 16:29

ExeterDad wrote:Alt
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
hough that would be a fun feature in the right game or server.

Talking about servers, suicide griefing on anarchy servers would be hilarious.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
<foot_on_teh_hill>DIAMOND!!!
<foot_on_teh_hill>AND heres mithril :OOOOOOOOOOO
<Cynthia>Hey all come see my new city
<foot_on_teh_hill>cuuumin,.......gotta pull these ore
<ABJ>Me too comin wait a sec craft something.
<Cynthia>meet at spawn
.................several blocks and chat lines later..................
<Cynthia>And here's the apartment building
<foot_on_teh_hill>Why wood?
<Cynthia>wood looks cool
<Cynthia>and here's store. here sell mese, diamod, iron, mithril, drills, travelnet, car, etc
<ABJ>wow nyc place
<Cynthia>AND here's my nuclear power plant..........
<ABJ>cynthobyl?
<foot_on_teh_hill>LOL ABC.........Thx 4 reminding me
<Cynthia>Hey neat nam!
<foot_on_teh_hill>BTW What's these steps?
<Cynthia>That......come
<Cnythia>This Is...............my secret nuclear bomb storage
<ABJ>wow lol cool.
<foot_on_teh_hill>ooo ooo i'm scared
<Cynthia>lets go up
<ABJ>WAIT a sec
***ABJ died!
***foot_on_teh_hill died!
***Cynthia died!
***CraigyDavi died!
***WARNING: Nuclear reactor meltdown at 115 2 356!!!
***mastercup died!
***JacobC died!
***WARNING: Nuclear reactor meltdown at 115 2 366!!!
***Guest1545 died!
***Batman died!
***WARNING: Nuclear reactor meltdown at 125 2 366!!!
***Herobrine died!
***TenPlus1 died!
***hoops_whoops died!
***MrCubeOP died!
***minecraftmadness died!
***WARNING: Nuclear reactor meltdown at 125 2 356!!!
***DevilMayhem died!
***CreeperRocker died!
***PilzAdam died!
<Cynthia> THE HECK??????!!!!!!!
<foot_on_teh_hill>$#$@!$
<TenPlus1>OHMGD!!!!!!
<minecraftmadness>NOOOOOOOOOO
<Batman>WTF HAS HAPPENED TO MY SERVER??????????
<Batman>I DON'T *&(#!#!!@ING BELIEVE THIS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by Don » Tue Apr 21, 2015 11:40

ABJ wrote:
ExeterDad wrote:Alt
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
hough that would be a fun feature in the right game or server.

Talking about servers, suicide griefing on anarchy servers would be hilarious.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
<foot_on_teh_hill>DIAMOND!!!
<foot_on_teh_hill>AND heres mithril :OOOOOOOOOOO
<Cynthia>Hey all come see my new city
<foot_on_teh_hill>cuuumin,.......gotta pull these ore
<ABJ>Me too comin wait a sec craft something.
<Cynthia>meet at spawn
.................several blocks and chat lines later..................
<Cynthia>And here's the apartment building
<foot_on_teh_hill>Why wood?
<Cynthia>wood looks cool
<Cynthia>and here's store. here sell mese, diamod, iron, mithril, drills, travelnet, car, etc
<ABJ>wow nyc place
<Cynthia>AND here's my nuclear power plant..........
<ABJ>cynthobyl?
<foot_on_teh_hill>LOL ABC.........Thx 4 reminding me
<Cynthia>Hey neat nam!
<foot_on_teh_hill>BTW What's these steps?
<Cynthia>That......come
<Cnythia>This Is...............my secret nuclear bomb storage
<ABJ>wow lol cool.
<foot_on_teh_hill>ooo ooo i'm scared
<Cynthia>lets go up
<ABJ>WAIT a sec
***ABJ died!
***foot_on_teh_hill died!
***Cynthia died!
***CraigyDavi died!
***WARNING: Nuclear reactor meltdown at 115 2 356!!!
***mastercup died!
***JacobC died!
***WARNING: Nuclear reactor meltdown at 115 2 366!!!
***Guest1545 died!
***Batman died!
***WARNING: Nuclear reactor meltdown at 125 2 366!!!
***Herobrine died!
***TenPlus1 died!
***hoops_whoops died!
***MrCubeOP died!
***minecraftmadness died!
***WARNING: Nuclear reactor meltdown at 125 2 356!!!
***DevilMayhem died!
***CreeperRocker died!
***PilzAdam died!
<Cynthia> THE HECK??????!!!!!!!
<foot_on_teh_hill>$#$@!$
<TenPlus1>OHMGD!!!!!!
<minecraftmadness>NOOOOOOOOOO
<Batman>WTF HAS HAPPENED TO MY SERVER??????????
<Batman>I DON'T *&(#!#!!@ING BELIEVE THIS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I would like to point out that the Batman in this chat log is not me.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

bbaez
Member
 
Posts: 50
Joined: Wed Jul 09, 2014 15:24

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by bbaez » Mon May 18, 2015 03:42

Hi everyone,

My kids like this mod but it would crash the server if they exited while still in a car and HUD would remain once out of car so I did the following patches. I have since found [Mod] Vehicle Mash [1.3] [vehicle_mash] and going to try that.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
aa0001@minetest01:~/minetest/mods$ diff /home/aa0001/minetest/minetest-0.4.10/mods/cars/melcar.lua streetscars-master/init.lua
1,244c1,2
< local melcar = {
<       initial_properties = {
<               hp_max = 100,
<               physical = true,
<               weight = 1000,  -- ( in kg)
<               visual = "mesh",
<               mesh = "car_001.obj",
<               visual_size = {x=1,y=1},
<               textures = {"textur_yellow.png"},
<               collisionbox = {-0.5,0.0,-1.85,1.35,1.5,1.25},
<               stepheight = 0.6
<       },
<       props = {
<               name = "Melcar",
<               max_vel = 35.0,
<               accel = 6.25,
<               decel = 4.5,
<               brakeDecel = 9,
<
<               -- Runtime variables
<               vol = 0,
<               driver = nil,
<               brake = false,
<               accelerate = false,
<               vel = 0,
<               gear = 0,
<               steerL = false,
<               steerR = false,
<               hud = {
<                       speed,
<                       gear,
<                       name,
<                       radio
<               }
<       }
< }
<
< function melcar:on_activate(staticdata)
<       -- Calculate some stuff
<       -- Volume based on collisionbox
<       local box = self.initial_properties.collisionbox
<       local vol = (box[4] - box[1]) * (box[5] - box[2]) * (box[6] - box[3])
<       self.props.vol = vol
<       -- Copy weight
<       self.props.weight = self.initial_properties.weight
< end
<
< function melcar:on_rightclick(clicker)
<       if self.props.driver == nil then
<               -- Update driver
<               self.props.driver = clicker:get_player_name()
<               -- Attach player
<               clicker:set_attach(self.object, "Root", {x=0,y=-5,z=0}, {x=0,y=0,z=0})
<               -- Move camera
<               clicker:set_eye_offset({x=0,y=-2.5,z=0}, {x=4,y=0,z=-5})
<               clicker:set_look_yaw(self.object:getyaw())
<               -- HUD
<               clicker:hud_set_flags({
<                       hotbar = false,
<                       healthbar = false,
<                       crosshair = false,
<                       wielditem = false
<               })
<               self.props.hud.speed = clicker:hud_add({
<                       hud_elem_type = "text",                         -- Show text
<                       position = {x = 0.5, y = 0.9},          -- At this position
<                       scale = {x = 100, y = 100},                     -- In a rectangle of this size
<                       number = 0xFFFFFF,                                     -- In this color (hex)
<                       name = "streets:melcar:speed",          -- called this name
<                       text = "Velocity: 0 kn/h",                      -- value
<               })
<               self.props.hud.gear = clicker:hud_add({
<                       hud_elem_type = "text",                         -- Show text
<                       position = {x = 0.1, y = 0.9},          -- At this position
<                       scale = {x = 100, y = 100},                     -- In a rectangle of this size
<                       number = 0xFFFFFF,                                     -- In this color (hex)
<                       name = "streets:melcar:gear",           -- called this name
<                       text = "N",                                            -- value
<               })
<               self.props.hud.name = clicker:hud_add({
<                       hud_elem_type = "text",                         -- Show text
<                       position = {x = 0.9, y = 0.9},          -- At this position
<                       scale = {x = 100, y = 100},                     -- In a rectangle of this size
<                       number = 0xFFFFFF,                                     -- In this color (hex)
<                       name = "streets:melcar:name",           -- called this name
<                       text = self.props.name,                         -- value
<               })
<               self.props.hud.radio = clicker:hud_add({
<                       hud_elem_type = "text",                         -- Show text
<                       position = {x = 0.5, y = 0.1},          -- At this position
<                       scale = {x = 100, y = 100},                     -- In a rectangle of this size
<                       number = 0xFFFFFF,                                     -- In this color (hex)
<                       name = "streets:melcar:radio",          -- called this name
<                       text = tostring(radio[math.random(1, #radio)]),        -- value
<               })
<               -- Timeout for name (like in GTA)
<               minetest.after(3, function()
<                       if self.props.driver then
<                               minetest.get_player_by_name(self.props.driver):hud_remove(self.props.hud.name)
<                       end
<               end)
<       else
<               if self.props.driver == clicker:get_player_name() then
<                       -- Update driver
<                       self.props.driver = nil
<                       -- Detach player
<                       clicker:set_detach()
<                       -- Move camera to default
<                       clicker:set_eye_offset({x=0,y=0,z=0}, {x=0,y=0,z=0})
<                       -- HUD
<                       clicker:hud_set_flags({
<                               hotbar = true,
<                               healthbar = true,
<                               crosshair = true,
<                               wielditem = true
<                       })
<                       clicker:hud_remove(self.props.hud.speed)
<                       clicker:hud_remove(self.props.hud.gear)
<                       clicker:hud_remove(self.props.hud.name)
<                       clicker:hud_remove(self.props.hud.radio)
<                       self.props.hud.speed = nil
<                       self.props.hud.gear = nil
<                       self.props.hud.name = nil
<                       self.props.hud.radio = nil
<               else
<                       minetest.chat_send_player(clicker:get_player_name(),"This car already has a driver")
<               end
<       end
< end
<
< function melcar:on_punch(puncher, time_from_last_punch, tool_capabilities, direction)
<       -- default.player_attached[self.props.driver] = nil
<       -- self.props.driver is the player name of the driver
<       -- local driver = minetest.get_player_by_name(self.props.driver)
<       if not puncher or not puncher:is_player() or self.removed then
<               return
<       end
<       if self.props.driver and puncher == self.props.driver then
<               self.props.driver = nil
<               clicker:hud_remove(self.props.hud.speed)
<                 clicker:hud_remove(self.props.hud.gear)
<                 clicker:hud_remove(self.props.hud.name)
<                 clicker:hud_remove(self.props.hud.radio)
<               puncher:set_detach()
<               default.player_attached[puncher:get_player_name()] = false
<       end
<       if not self.props.driver then
<               self.props.removed = true
<               -- delay remove to ensure player is detached
<               minetest.after(0.1, function()
<                       self.object:remove()
<               end)
<               if not minetest.setting_getbool("creative_mode") then
<                       puncher:get_inventory():add_item("main", "streets:melcar")
<               end
<       end
< end
<
< function melcar:decel(dtime)
<       -- Decelerate down to more or less 0
<       if self.props.vel > 0 then
<               self.props.vel = self.props.vel - (self.props.decel * dtime)
<       end
< end
<
< function melcar:on_step(dtime)
<       local pos = self.object:getpos()
<       local under = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z})
<       local inside = minetest.get_node_or_nil(pos)
<       -- Apply gravity
<       local grav = 0
<       if inside and minetest.registered_nodes[inside.name] then
<               if inside.name == "air" then
<                       grav = -9.81
<               elseif minetest.get_item_group(inside.name, "liquid") ~= 0 then
<                       -- Use this for all liquids
<                       grav = (1 * -9.81 * self.props.vol) / self.props.weight
<               end
<               self.object:setacceleration({x = 0, y = grav, z = 0})
<       end
<       -- Player controls
<       if self.props.driver and self.props.driver ~= nil then
<               local driver = minetest.get_player_by_name(self.props.driver)
<        -- Addition of checking if driver has exited game and driver is now nil
<               if driver ~= nil then
<                       local ctrl = driver:get_player_control()
<                       -- up
<                       if ctrl.up then
<                               self.props.brake = false
<                               self.props.accelerate = true
<                               self.props.gear = 1
<                               self:update_hud_gear()
<                               -- Only accelerate if max_speed not reached and player does not steer and on solid
<                               if self.props.vel < self.props.max_vel and self.props.steerL == false and self.props.steerR == false and under and minetest.registered_nodes[under.name].drawtype == "normal" then
<                                       self.props.vel = self.props.vel + (self.props.accel * dtime)
<                               end
<                               if under and minetest.registered_nodes[under.name].drawtype ~= "normal" then
<                                       self:decel(dtime)
<                               end
<                       else
<                               self.props.accelerate = false
<                               self:decel(dtime)
<                       end
<                       -- down
<                       if ctrl.down then
<                               self.props.brake = true
<                               self.props.accelerate = false
<                               -- Brake down to more or less 0
<                               if self.props.vel > 0 then
<                                       self.props.vel = self.props.vel - (self.props.brakeDecel * dtime)
<                               end
<                       else
<                               self.props.brake = false
<                       end
<                       -- left
<                       if ctrl.left and self.props.vel > 0 and under and minetest.registered_nodes[under.name].drawtype == "normal" then
<                               self.object:setyaw(self.object:getyaw() + math.pi / 120 + dtime * math.pi / 120)
<                               minetest.get_player_by_name(self.props.driver):set_look_yaw(self.object:getyaw() + math.pi / 120 + dtime * math.pi / 120)
<                               self.props.steerL = true
<                       else
<                               self.props.steerL = false
<                       end
<                       -- right
<                       if ctrl.right and self.props.vel > 0 and under and minetest.registered_nodes[under.name].drawtype == "normal" then
<                               self.object:setyaw(self.object:getyaw() - math.pi / 120 - dtime * math.pi / 120)
<                               minetest.get_player_by_name(self.props.driver):set_look_yaw(self.object:getyaw() + math.pi / 120 + dtime * math.pi / 120)
<                               self.props.steerR = true
<                       else
<                               self.props.steerR = false
<                       end
<               end
<       else
<               self:decel(dtime)
<       end
<       -- Stop if very slow (e.g. because driver brakes)
<       if math.abs(self.props.vel) < 0.1 and self.props.accelerate == false then
<               self.object:setvelocity({x = 0,y = self.object:getvelocity().y,z = 0})
<               self.props.gear = 0
<               -- Addition of checking if driver has exited game and driver is now nil
<               if driver ~= nil then
<                       self:update_hud_gear()
<               end
<               return
<       end
---
> --[[
>       StreetsMod: Experimental cars
246,276c4,18
<       --Apply velocity
<       local finalVelocity = scalar2vec(self, {
<               dir = self.object:getyaw(),
<               scalar = self.props.vel
<       })
<       -- Copy y velocity (caused by gravity) to make sure it doesn't get overriden
<       finalVelocity.y = self.object:getvelocity().y
<       self.object:setvelocity(finalVelocity)
<       self.props.vel = merge_single_forces(finalVelocity.x, finalVelocity.z)
<       -- Addition of checking if driver has exited game and driver is now nil
<       if driver ~= nil then
<               self:update_hud_speed()
<       end
< end
<
< function melcar:update_hud_gear()
<       if self.props.driver and self.props.driver ~= nil and self.props.hud.speed ~= nil and self.props.hud.gear ~= nil then
<               -- Update HUD
<               minetest.get_player_by_name(self.props.driver):hud_change(self.props.hud.gear, "text", gearT[self.props.gear])
<       end
< end
<
< function melcar:update_hud_speed()
<       if self.props.driver and self.props.driver ~= nil and self.props.hud.speed ~= nil and self.props.hud.gear ~= nil then
<               -- Update HUD
<               minetest.get_player_by_name(self.props.driver):hud_change(self.props.hud.speed, "text", "Velocity: " .. tostring(math.abs(math.floor(self.props.vel * 3.6))) .. " km/h")
<       end
< end
<
< -- Register
< minetest.register_entity(":streets:melcar", melcar)
---
>       Documentation:
>               initial_properties.weight: float (kilogramm)
>               props.max_vel: float (in b/s)
>               props.accel: float (in m/s^2)
>               props.decel: float (in m/s^2)
>               props.brakeDecel: float (in m/s^2)
> ]]
> dofile(minetest.get_modpath("cars") .. "/physHelpers.lua")
> dofile(minetest.get_modpath("cars") .. "/melcar.lua")
>
> gearT = {
>       [-1] = "R",
>       [0] = "N",
>       [1] = "D"
> }
278,291c20
< minetest.register_craftitem(":streets:melcar_spawner", {
<       description = "Melcar",
<       inventory_image = "streets_melcar_inv.png",
<       wield_image = "streets_melcar_inv.png",
<       on_place = function(itemstack, placer, pointed_thing)
<               if pointed_thing.type ~= "node" then
<                       return
<               end
<               pointed_thing.under.y = pointed_thing.under.y+0.5
<               minetest.env:add_entity(pointed_thing.under, "streets:melcar")
<               itemstack:take_item()
<               return itemstack
<       end,
< })
---
> radio = {"K-Rose", "K-DST", "WCTR", "SF-UR", "PlaybackFM", "Radio Los Santos", "bounceFM", "K-JAH", "CSR", "RadioX", "MasterSounds"}
\ No newline at end of file
 

im-poke
Member
 
Posts: 1042
Joined: Sat Apr 18, 2015 15:50
IRC: poke
In-game: poke

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by im-poke » Sat Aug 22, 2015 16:03

i would like to make a police car addition.
ARE YOU A NYAN CAT?????
--ABJ
 

smash
Member
 
Posts: 16
Joined: Thu Jun 27, 2013 20:39

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by smash » Wed Dec 23, 2015 00:13

When I enable the cars mod, the game will not even start. I get this error:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
18:01:52: WARNING: Undeclared global variable "streets" accessed at /home/mrhip/.minetest/mods/cars/init.lua:4
2015-12-22 18:01:52: ERROR[main]: ========== ERROR FROM LUA ===========
2015-12-22 18:01:52: ERROR[main]: Failed to load and run script from
2015-12-22 18:01:52: ERROR[main]: /home/mrhip/.minetest/mods/cars/init.lua:
2015-12-22 18:01:52: ERROR[main]: /home/mrhip/.minetest/mods/cars/init.lua:6: attempt to concatenate a nil value
2015-12-22 18:01:52: ERROR[main]: stack traceback:
2015-12-22 18:01:52: ERROR[main]:    /home/mrhip/.minetest/mods/cars/init.lua:6: in main chunk
2015-12-22 18:01:52: ERROR[main]: ======= END OF ERROR FROM LUA ========
2015-12-22 18:01:52: ERROR[main]: Server: Failed to load and run /home/mrhip/.minetest/mods/cars/init.lua
2015-12-22 18:01:52: ERROR[main]: ModError: ModError: Failed to load and run /home/mrhip/.minetest/mods/cars/init.lua
2015-12-22 18:01:52: ERROR[main]: Error from Lua:
2015-12-22 18:01:52: ERROR[main]: /home/mrhip/.minetest/mods/cars/init.lua:6: attempt to concatenate a nil value
2015-12-22 18:01:52: ERROR[main]: stack traceback:
2015-12-22 18:01:52: ERROR[main]:    /home/mrhip/.minetest/mods/cars/init.lua:6: in main chunk
2015-12-22 18:01:52: ERROR[main]: Check debug.txt for details.
 

smash
Member
 
Posts: 16
Joined: Thu Jun 27, 2013 20:39

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by smash » Mon Dec 28, 2015 00:51

I don't know how lua works in Minetest, but I tried replacing "streetscars" with "cars" on lines 6, 7, and 8 of init.lua. The game now starts, but when I place a car, no car appears. Instead, a pink block saying "unknown object" appears.
 

Dragonop
Member
 
Posts: 1178
Joined: Tue Oct 23, 2012 12:59
GitHub: Dragonop
IRC: Dragonop
In-game: Dragonop

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by Dragonop » Mon Dec 28, 2015 03:43

No, redownload and rename the mod folder to "streetcars", that's your problem, it's a known issue, people not knowing how to install mods.
viewtopic.php?f=9&t=6450
http://dev.minetest.net/Installing_Mods
 

smash
Member
 
Posts: 16
Joined: Thu Jun 27, 2013 20:39

Re: [Mod] Car extension for StreetsMod (ALPHA)[cars]

by smash » Mon Dec 28, 2015 03:51

I did that just now. I then typed in:
/spawnentity streets:melcar
and I still get a pink unknown object.

I also tried:
/spawnentity streetscars:melcar
/spawnentity cars:melcar
and the same thing happens (I get a pink unknown object). Is there another command I'm supposed to use?
 

Previous

Return to WIP Mods

Who is online

Users browsing this forum: Google [Bot] and 11 guests

cron