#modules

1 messages ยท Page 11 of 1

tulip lily
#

Check if at least the emote function works on npcs, I forgot the name

cobalt saffron
#

elise

#

they can play animation lol

open crypt
tulip lily
#

updateNPC it's a suggestion lol

#

An NPC can do almost anything a player can do, this includes walking animations and emotes

#

It has a lua function that emotes players, this works for npcs as well

open crypt
#

sweet x)

#

this gonna be so much fun

tulip lily
#

yup

civic burrow
#

ah ok

tulip lily
#

Later I will put updateNPC in the suggestion channel

civic burrow
tulip lily
#

No?

cobalt saffron
#

is the base sprite

tulip lily
#

Hm, it would be nice if it worked, sadly, in my tests (on adverse servers...) you can get emotes on npcs

cobalt saffron
#

can have several same name npc and no you need to spawn when new player comes

tulip lily
#

so it could have an optional parameter to spawn the npcs for someone specific

cobalt saffron
#

playername param

tulip lily
#

Yup

cobalt saffron
#

since event can spawn different npc depending on playerstage

tulip lily
#

well, considering that the suggestions were taken into account (about adding npcs) it's already a good thing, and fun. Now just wait for the Tig to polish our possibilities in terms of the npcs.

cobalt saffron
#

we can now create a full rpg

#

hitbox detection, npc

#

full enviroment modification

mild sage
tame granite
tulip lily
mild sage
#

It would be nice if we could control the NPC with all the normal player functions

#

Although it might create some conflict with name system

tulip lily
# tame granite

That's what I said in the suggestions about NPC IDs when I joined the discussion... If you and the NPC had the same playerCode you could move the npc instead of your mouse.

open crypt
#

I'm so into RuneScape right now ๐Ÿ˜‚

#

MiceScape

tulip lily
#

Lol

obtuse latch
#

wuts that?

tulip lily
#

if emotePlayer becomes compatible with NPCs we can pay homage to Papaille and Elise, for those who remember room 801, it would be nostalgic.

hearty flint
#

is it possible to move them?

tulip lily
#

Technically yes, not at the moment.

#

I made a suggestion on the channel about this, use updateNPC to activate the movement system or at least change its coordinates.

hidden fjord
#

Got an idea

#

But it needs to be tested

lone stream
#

@civic burrow que babado esses NPCs

civic burrow
#

๐Ÿ˜ณ

cobalt saffron
#

done porting npcs

mild sage
#

woah

cobalt saffron
#

#aurora0capitol for the old versio

#

it just replaced images eventloops and textareas for only one npc loop

#

from a table and a new event

#

ill make a list of npcs

#

alright i got the best idea ever

#

relocate 25 npcs to village

#

LOL

cobalt saffron
#
  • village npcs and goodas
#

there is also one at the right

hidden hinge
#

How can i change npc's name color?

lone stream
#

Os npc respiram como um ratinho normal?

mild sage
tough token
tough token
#

why is he talking instead of me? ๐Ÿ˜„

whole tide
#

because its you

open crypt
#

@ivory kelp I just saw your DM, you're the same person right?

woeful geyser
#

๐Ÿ‘€

tough token
#

can NPC show emotions?

tough token
hidden fjord
#

Interesting

woeful geyser
#

Cool !!

open crypt
#

with NPC additions, it's even possible to create an in-game dressroom ๐Ÿค”

hidden fjord
#

Yes

#

Now amongmice can leave real mouse bodies

#

Interactive mouse corpses

tulip lily
#

if we can activate emojis and movement animations on npcs it would be possible to create an RPG story on mice with missions :v

mild sage
#

tfma:

tulip lily
#

:v

cobalt saffron
#

pots done

#

seed done also plant color system was already implemented

#

the last thing is reward players when mix of flowers

cobalt saffron
#

we can use tomb rumble core and implement with current lua state

tulip lily
#

Cool

#

If I'm not mistaken, there was an event about planting, right?

cobalt saffron
#

yes

#

well

#

we can't add npcs on submode maps

tulip lily
#

Submode?

cobalt saffron
#

village room

tulip lily
#

Oh

#

so the code below doesn't work?

function eventNewGame()
    tfm.exec.addNPC("Oracle")
end

tfm.exec.newGame(801)
cobalt saffron
#

oh i just added them straight

#

with no eventnewgame

#

i may try later

#

or maybe i did something wrong

#

yep i did something wrong

ivory kelp
#

I need help with lua NPC

whole tide
#

I think you need more npcs ๐Ÿ’€

open crypt
whole tide
#

how many npc u have

open crypt
#

at the moment

#

29 ๐Ÿ˜‚

whole tide
#

bruuuuuuuuuh

#

what theme you following

open crypt
#

snowy theme at the moment

whole tide
#

if their was quests and story

#

that will take ages

open crypt
#

according to what I have planned so far (on paper, still coding)

#

there will be 419 quests

whole tide
#

omg

open crypt
#
  • you can level up skills
#

woodcutting, cooking, fishing ๐Ÿ˜‚ the typical RuneScape stuff

tame granite
whole tide
open crypt
#

that's... PERFECT pls

#

the perfect NPC room ever

whole tide
tame granite
#
function randomLook()
  local t = {}
  for i=1,9 do
    t[i] = math.random(100)
  end
  return math.random(100) .. ";" .. table.concat(t, ",")
end

open crypt
#

๐Ÿ˜‚

#

some looks on it

#

it's... hilarious LMAO

#

I mean, this look is by far the best I've seen

open crypt
whole tide
#

i can help with the map if you havenโ€™t made it

tulip lily
tulip lily
civic burrow
#
function randomLook()
  local t = { }
  for i = 1, 9 do
    t[i] = math.random(100)
    if math.random(100) > 50 then
      local tmpC = { }
      for c = 1, math.random(1, 5) do
        tmpC[c] = string.format("%06x", math.random(0xFFFFFF))
      end
      t[i] = t[i] .. "_" .. table.concat(tmpC, "+")
    end
  end
  return math.random(100) .. ";" .. table.concat(t, ",")
end
#

man that's hella fun

tulip lily
#

Yup

#

And every now and then some good looks come

civic burrow
#

it's kinda resource intensive

#

60 almost crashed my client

tulip lily
#
function randomLook()
    local items = {}

    for item = 1, 9 do
        items[item] = math.random(100, 300)

        if (math.random(100) > 50) then
            local tempColor = {}

            for color = 1, 7 do
                tempColor[color] = string.format("%06x", math.random(0xFFFFFFFF))
            end

            items[item] = items[item] .. "_" .. table.concat(tempColor, "+")
        end
    end

    return math.random(100, 200) .. ";" .. table.concat(items, ",")
end
tulip lily
#

Could make a simpler generator without the colors and using a default string

#
"%d;%d,%d,%d,%d,%d,%d,%d,%d,%d"
#

It would be enough to generate 10 random numbers and format

tulip lily
civic burrow
#

100, 300?

#

not all categories have 300

#

also () in a for loop is quite confusing in lua xd

tulip lily
#

Not all, but in that case the item would be invisible

civic burrow
#

Aahh, got it

#

makes sense

tulip lily
#

:v I find it simpler to understand with () but I get the point

#

Forgot to suggest the most basic function that would help a lot too :v

#

tfm.exec.removeNPC(name)

civic burrow
#

true

tulip lily
#

ready, suggested

civic burrow
#

Not needed, all these are already on Tig's to do list

tulip lily
#

cool :3

#

Amazing ๐Ÿคฉ

#

if all this is done it will be wonderful, I hadn't even thought about this custom title and putting emotions when spawning

#

801 nostalgia, let's go

#

it would also be fun to create a minigame with quests, where the npcs talk to you and give you quests

#

You could even make a choice system in the dialog (Minstens already has a dialog system, if you use eventKeyBoard you can create a selection menu with the arrows)

civic burrow
#

the spawn part is mostly because i didn't want to bother him with "can playEmote work for NPCs", i think that's for the future

tulip lily
#

Makes sense, he must be busy. In that case we can go little by little, he can do these things later.

tulip lily
#

Bolo, would it be a problem to create custom events e.g eventBlahUpdated? or would it be better to create an event listener .on?

#
-- custom event (following tfm api)
function eventBlahUpdated(params)

end

-- custom event (listener, following js-like handlers (old way))
table.on("blahUpdated", function(params)

end)
#

About JS I say old way because nowadays we use Promises instead of callbacks

civic burrow
#

events are just functions called in specific situations so i'd rather go with that on tfm to save resourcs on things that really matter

tulip lily
#

So in this case, if you want to create custom events, the best way would be to follow the tfm api

civic burrow
#

for me yes

tulip lily
#

ok thx :3

civic burrow
#

shout out to the round ended event i usually use in my events :v

whole tide
hearty flint
woeful geyser
tulip lily
# hearty flint

Bruh, can you put \n and \t in the names? Have you tried using tags?

civic burrow
#

oh using tags would solve the name color

#

kinda

tulip lily
#

Yup

#

Try smth like <ROSE>Oracle</ROSE> of course it wouldn't spawn Oracle, but at least it would color the name

civic burrow
#

i wonder if the variable is sanitized ๐Ÿ‘๏ธ

#

if it's used in a query*

tulip lily
#

:v good question, but then we can use newlines and tabs...

civic burrow
#

that's why i wondered kek

tulip lily
#

It would be nice if it sanitizes the name and puts the nameColor property in the spawn config

#

I mean, an NPC wouldn't have such a long name that you'd need to use line break, right?

civic burrow
plucky tendon
#

you can

#

tested <B></B> it works

open crypt
#

@civic burrow ๐Ÿ˜‚ where did NPC's name go

#

also, apparently <font> works @civic burrow

plucky tendon
#

yep

civic burrow
#

aaaaa

plucky tendon
civic burrow
#

oh ok

#

that's why because i used <

#

damn chat

open crypt
#

what if you do <a href>? ๐Ÿ˜‚

civic burrow
#

hm nope

#

<font wont work

#

it will just get rid of the nickname

#

tfm.exec.addNPC("<font color='#FF0000'>Test</font>", {x=500})

#

but you can soopafresh it!

tulip lily
#

Lol

#

so tags technically work with the name of the npcs, only some that bug or do nothing

hidden fjord
#
local playerList = {}

eventNewPlayer = function(playerName)
    playerList[playerName] = tfm.get.room.playerList[playerName]
end

eventPlayerLeft = function(playerName)
    local playerGender = false
    if playerList[playerName].gender ~= 2 then
        playerGender = true
    end 
    tfm.exec.addNPC(playerList[playerName].playerName, {
        title = playerList[playerName].title,
        female = playerGender,
        x = playerList[playerName].x,
        y = playerList[playerName].y,
        look = playerList[playerName].look,
        lookAtPlayer = true
    })
    playerList[playerName] = nil
end

eventLoop = function()
    for playerName in next, playerList do
        if playerList[playerName] and tfm.get.room.playerList[playerName] then
            playerList[playerName].x = tfm.get.room.playerList[playerName].x
            playerList[playerName].y = tfm.get.room.playerList[playerName].y
        end
    end
end

for playerName in next, tfm.get.room.playerList do
    eventNewPlayer(playerName)
end``` leave a statue when a player leaves
#

also i glitched the feature

plucky tendon
#

top secret new event prototype I have in mind

plucky tendon
#

fuck it

#

color codes not supported in npc

tulip lily
#

Lol

plucky tendon
#

alright

#

we can change titles for the official npcs

#

meh

lone stream
random kraken
#

Anyone know if there is a way to use ur sham skills in utility rooms?

#

and any way to test divine mode for ppl who dont have divine mode unlocked yet?

tulip lily
#

You can do both, but not in the utility rooms

#

You can create a script to make someone a shaman in divine mode

random kraken
#

and are there scripts to do it ;o? (it is legal right? cuz idk anything about that xD)

tulip lily
#

yes, they are Lua scripts, they use the game's minigames API

random kraken
#

r there scripts for it already which i can copy paste?

mild sage
#

If you're willing to wait 15 minutes I can do something for you

random kraken
#

take your time and feel free to dm me ^^!

mild sage
random kraken
mild sage
#

Sure

trail oracle
random kraken
trail oracle
#

nw, also u should press H for help menu if confused

random kraken
#

ofc :P

plucky tendon
#

I wonder if NPC can trigget hit collision

#

this would be very weird but interesting

#

nope they do not trigger it

hearty flint
#

the collision is calculated by the client I think

tulip lily
whole tide
#

from what we see the current engine is not that great

tulip lily
mild sage
#

The physics engine is OK. Most of the performance issues are related to the Flash engine which creates a lot of garbage objects

tulip lily
#

Would be better to recreate the game on a recent engine like Godot, Unity or others than to replace the entire physics system.

tulip lily
#

Box2D it's not that bad, the problem is Flash itself which has a bad memory handling

civic burrow
#

Honestly, TFM's physics is the best one I've seen in all 2D games I've played

#

It's smooth and sincere, ofc it has some edgy cases but part of the gameplay.

tulip lily
#

Yes I agree, Box2D is not that bad, I would use it in JS if I could.

#

(I don't use it because the library that exists is pure JS, if it was WebAssembly I would even use it, pure JS to process physics is horrible.)

inner carbon
#

there are a lot of other parts in the game code that have poor design

#

tho they're really old so yeah

tulip lily
inner carbon
tulip lily
inner carbon
tulip lily
#

Got it, considering that the game contains old code, it is understandable why the poor performance then.

inner carbon
#

ye those sections haven't been touched in ages

tulip lily
#

i wonder if it would be too complicated to fix at least the cache system for the looks, do something like, if the player leaves the room their look is removed from the cache

hearty flint
#

most are particles

tulip lily
#

It's more of a programming problem, but it can be a problem with both the engine and the Tig code

#

There are three things I learned working with multiplayer:
- Avoid sending all game state when you are updating only X thing, it lessens server stress and you can always have a new id package for such update. Example: A player's state, if you update x and y coordinates then just send coordinates, you don't need to send visual, name, code, etc. all over again.
- Whenever an object in the room is unloaded and is no longer useful, destroy its object and clear its texture from the cache, so you don't fill up the memory allocated to the game and it maintains good performance.
- Never use nickname as an identifier, whenever you can use numeric ID because it is simpler and if you need to change the player's name there will be no internal conflict.

whole tide
tulip lily
#

In the matter of player synchronization, it is already like this, the game transmits only what is necessary

tulip lily
cobalt saffron
#

depends

#

let me get you the network packets

#

in tfm they use some sort of temporary ids

#

nope that is for chat

#

but yes they use the main account id instead of the name for events

tulip lily
#

I already have them

Tokens: (4, 4) Meaning: Sync Player Movement

The server receives the player's code, his x and y speed, his x and y position, his angle, which frame of the jump sprite, if he is jumping, if he is moving to the right, if he is moving to the left and some things I forgot. But everything involved with the player's movement.

#

After receiving and storing the information it is relayed to the other players to create the sensation of movement in real time.

#

When a player logs into the server he is given two identifiers, a temporary identifier and his account ID. Rooms use the temporary ID to differentiate you from other players and to be able to update your information on the screen of other players without compromising your unique ID.

#

This temporary ID is what I've been calling the player code.

#

Although it doesn't make much sense, if you go to the forum and copy someone's avatar link you get their unique id

#

NPCs also get player codes, so if we have the same player code as an NPC we will control them, so I was curious if we would have to choose an ID for them.

wind storm
tulip lily
#

No, I'm currently out of time. I work during the day and study at night, I only have Saturdays and Sundays off, so i wouldn't even be useful for Lua Team.

cobalt saffron
#

in fact in order to remove them they must return an id like images

flat vergeBOT
#

๐ŸŒ™ Lua update! What's new?

โ€ข Added targetPlayer parameter to tfm.exec.addNPC.
โ€ข New function system.openEventShop(shopIdentifier, playerName) to open the event shop interface. [events only]

cobalt saffron
#

so there is a hidden npc parameter that toggles official npc shops

#

oh

#

is the shop itself

tulip lily
#

hm

civic burrow
#

to buy chests

#

from what i know its structure is gonna change by a lot in the future, idk

cobalt saffron
#

alright so the new lua event is global event

#

so we must farm gold tickets from OFFICIAL EVENT

civic burrow
#

hm yes xd

cobalt saffron
#

is the armaggeddon there

civic burrow
#

only the events that wve had this year

cobalt saffron
#

what

#

we barely had one

civic burrow
#

3

cobalt saffron
#

?

mild sage
#

Dragon and Saint Valentine

cobalt saffron
#

so the global event is just a plain shop map

#

like the one from the official event

open crypt
#

Look @civic burrow ... lets make a plain shop map as an event

#

Easy done ๐Ÿ˜‚

civic burrow
#

๐Ÿ˜‚

tulip lily
#

Lmao

hearty flint
#

Tig could add a function to create stores with that NPC UI

#

Like village NPCs

civic burrow
hearty flint
#

:o

inner carbon
tulip lily
#

Hm

#

Sorry if I randomly DMed any of you, I accidentally put my unlocked phone in my pocket and it started sending links from here to everyone

hearty flint
whole tide
#

I smell android phone

tulip lily
deep kraken
#

on mycity, how long does it take for a wheat seed to grow?

#

i was harvesting tomatoes but the module stopped so i lost all my tomatoes ๐Ÿ˜ฆ

deep kraken
#

i cant give the sauce to karina

#

it doesnt work

dull condor
#

I suggest you to join discord mycity module

#

They can help you

mild sage
#

I've noticed the modules/scripts take more time to load at nights (in my time, a couple hours before restart), is this due to a memory leak? ๐Ÿ‘€

inner carbon
mild sage
#

When you do /lua and send the script, the message [Indexinel#5948] Lua script loaded in 2740 ms (4000 max) is sent when everything in the init of the script is loaded. I've noticed something weird, because the same script takes 2.5 - 2.8 seconds to load in the morning but as time goes it increases the loading time, yesterday at night it was 3.4 s

tulip lily
#

Bruh

deep kraken
dull condor
deep kraken
tulip lily
#

Rabbit's skull ๐Ÿ‘€

tulip lily
#

Hallelujah ๐Ÿ™Œ It's been almost 5 months since I signed up to test

tulip lily
#

Thx

bold flint
#

Could the Simon Says game be a module?

tulip lily
#

Sorry ๐Ÿ˜… ping accidentally

bold flint
#

Why does the map crumble in the new egg event?

civic burrow
#

Whut?

bold flint
#

The map falls down

#

One after another

tulip lily
#

#BoloForAdmin

whole tide
#

#BoloForAdmin

tulip lily
#

Upvote on twitter for Bolo to become Admin and help Tig in the game :v

whole tide
#

But I only use twitter for one thingโ€ฆ

whole tide
#

Santa got it, watching memes

tulip lily
mild sage
#

#BoloForAdmin

civic burrow
#

โŒ

mild sage
#

nossa, eu acho que nem tinham liberado as imagens kkkkkkkkkkjj

civic burrow
#

Nice!

tulip lily
#

nice, but is this a representation or is it possible to update the npcs already?

mild sage
#

lembrei o porquรช desisti de programar

dull condor
#

Lmao

#

That's beautiful, idk what you're talking about

civic burrow
hearty flint
#

Ah รฉ BR, entรฃo Kยนโฐ

tulip lily
wintry swan
#

Guyss

mild sage
#

I've thought about this, if there were a way for community to share scripts and be required by other scripts without the need to copy&paste the entire code. These scripts files would be handled by the Module Team, and players could do, for example 'require("xmlparser")' without copying everything, and even being able to store it into a local variable. What do you think?

tulip lily
#

I wish it had too, one thing that tfm lacks is the power to have files to organize the code.

#

I had thought about starting to create an IDE for tfm that when compiling the project joins all the files in one in the desired order

halcyon arrow
#

i made made something similar as a python script

tulip lily
tulip lily
#

I suggested tfm.exec.setPlayerVisibility in #suggestions-old, if anyone can support I would appreciate it ๐Ÿ˜

dull condor
#

I'm a simple person, I see lua and i upvote xD

cobalt saffron
#

what is that

mild sage
#

We should get organised and upvote +40 every one of the Lua suggestions

whole tide
#

every lua/xml related suggestion i vote for it

civic burrow
#

if you dont mention where such functionality would be used at / useful for, it's probably gonna be in the lower priority list

#

there's already a long list of things we need in lua

tulip lily
mild sage
whole tide
#

even when i haven't reached 700 objects in my map, still it doesn't spawn all grounds but it spawned all skull tokens

mild sage
#

Spawn them with Lua function

versed sky
#

hi

plucky tendon
mild sage
#

๐Ÿ‘€

tulip lily
plucky tendon
dull condor
#

How :o

plucky tendon
civic burrow
digital igloo
# plucky tendon

Beat module????? Mg i'm going to quit osu as soon as it'll be real

cobalt saffron
#

Cant speak about it๐Ÿ™‚ ๐Ÿ™ƒ

whole tide
tulip lily
#

๐Ÿค” module team has tfm.exec.playSound and we didn't know?

mild sage
#

I've never seen a module that plays sounds thinking

cobalt saffron
#

Well see how we do it

halcyon topaz
mild sage
#

Is not possible

halcyon topaz
#

๐Ÿ˜ฆ

cobalt saffron
#

bonus id grabbed does not work

open crypt
cobalt saffron
#

only for one type bonus

#

tested the rest of bonuses they return nothing

open crypt
#

afaik that's intentional?

@civic burrow, the other bonus ID's do not activate eventPlayerBonusGrabbed, only 0 does.

civic burrow
#

yes

mild sage
mild sage
#

tysm

merry parcel
halcyon topaz
#

ahh thanks m_tongue

tulip lily
#

Could have the return of the events of 2012 >.> I miss the skeleton cat event on halloween

mild sage
#

how to add password to prophunt??

flat vergeBOT
#
  • [lua] The minimum interval of system.newTimer is now 500 ms.
  • [lua] Added parameter windScale to tfm.exec.setPlayerGravityScale().
  • [lua] Added function tfm.exec.movePhysicObject() to move an object spawned by tfm.exec.addPhysicObject().
flat vergeBOT
#

Everyone, please welcome Indexinel#5948 as the newest Module Team member!

whole tide
#

Welcome bro, congrats โค๏ธ

floral tartan
#

how would i be able to create a module in transformice for the public to play it?

#

also i code only lua

hidden trail
floral tartan
#

woah

#

so like you're module has to pitched to the module member(s) and then it could be public for the people to play it?

#

where can i find the module api?

hidden trail
#

Check pinned messages you can find lots of resources there including the module api

willow blaze
#

if i can suggest a gamemode here, then i have a suggestion. i think it would be cool to have a gamemode where the map has mouse collision. the mice spawn on a large platform and the goal is to push everyone off the map and be the last one standing. no shamans. here is an example map: <C><P C="" F="7" /><Z><S><S L="150" X="394" H="39" Y="311" T="0" P="0,0,0.3,0.2,0,0,0,0" /><S L="453" H="46" X="394" Y="168" T="0" P="0,0,0.3,0.2,0,0,0,0" /><S L="150" H="39" X="132" Y="311" T="0" P="0,0,0.3,0.2,0,0,0,0" /><S L="150" H="39" X="656" Y="311" T="0" P="0,0,0.3,0.2,0,0,0,0" /></S><D><DS Y="130" X="394" /></D><O /></Z></C>

#

i suggest the gamemode name be sumo or something i honestly dont know what to call it

sick arch
#

Im quite sure we have a sumo module already? Atleast ive seen it in funcorp rooms

abstract rivet
#

Mice mma!

woven minnow
#

how to fix this

civic burrow
#

define this

cobalt saffron
#

It seems a failed stringformat

tidal pier
tulip lily
#

The modules community looks so dead :c

whole tide
#

Well Iโ€™m just waiting for Santa RuneScape game to be finished

mild sage
#

RuneScape? ๐Ÿ‘€

whole tide
#

yeah its a module Santa working on with 9871237981 Npc's

open crypt
#

only 24 so far ๐Ÿ‘€

covert sedge
tulip lily
#

Lmao

cobalt saffron
#

fadeOut glitched

#

fadeIn good

open crypt
cobalt saffron
#

seems to work

whole tide
#

oh god it looks like retro game now

tulip lily
#

transformice is getting good for creating more elaborate minigames

#

We just need to be able to increase the size of the popup to have a larger input field

whole tide
#

Bowser is in TFM now!!
The new update for Mario is amazing, I won't spoil anything more until @halcyon arrow finish with the script.
Thanks to @tame granite and @austere turret for the ideas and testing Bowser map

obtuse latch
whole tide
#

Hello everyone, @halcyon arrow and I have brought to you Mario 2 which is amazing with less to no lag at all so some of the players that have difficulty and lag they can play and enjoy, also new maps and Boss fight.

There are some new things as well:

  • A new game called Jumper, which u can play with your friends.
  • New DeathMaze map ( biggest DeathMaze map ever).
  • DeathMaze anti-cheat script (Funcorp members need to ask pshy or me for it)

https://atelier801.com/topic?f=6&t=896069&p=1#

grim citrus
#

best mini games ever

abstract rivet
#

Pros!! pugPls

mild sage
whole tide
#

Nice work, did you find the hidden path in Boss level ?

frozen timber
#

I have the module idea

worthy canopy
#

?

frozen timber
#

Robbing the dangeon

#

You need to rob the dangeon

#

With lots of traps

#

And gold with cheese at the end

#

There will be power ups that you can upgrade every level up in module like
+1 Life
Placing items
Flying

#

And other

worthy canopy
#

cool!

mild sage
#

Sounds good

#

Would need a highly developed NPC system and some specific art but I see it working, not as #module room though, unless built with few players, but seems like an interesting idea

whole tide
#

New monster in Mario now, Piranha Flowers. Don't let it bite you!

dull condor
#

๐ŸŸ ๐ŸŒท

hidden fjord
dire orchid
#

how can i do something like that?
players.variable
players is a table and the variable holds a value of something inside the table

hearty flint
#

players[variable]?

mild sage
# dire orchid how can i do something like that? players.**variable** players is a table and th...

You must create a table if you don't have one

players = {}

You can declare some values already when you initialise it:

players = {
  variable = 123,
  something_else = 456,
  ["wรฎth spรกcรจs% - & $รฝmb0|s"] = 789 -- You use squared brackets when the key has special symbols or spaces
}

or either you can create the table, and also add values on demand:

players = {}
players.variable = 123
players.another_variable = 456 -- underscores are valid characters
players["+ fancy name +"] = 789
dire orchid
#

thx both of you

tulip lily
paper kraken
#

can someone give me commands list from #utility please

dire orchid
paper kraken
dire orchid
#

np

buoyant lynx
#

micecraft my beloved

dire orchid
#

lol

#

does anybody has an idea how can i make a lot of words in that order? :
word1 word3 word3
to
"word1","word2","word3"

mild sage
#

You mean putting them in a list?

dire orchid
#

i have found a site thx anyway i meant like this

whole tide
dire orchid
whole tide
#

thanks

dire orchid
#

another question. can i get ui text area string by its id?

mild sage
#

Nope, you're supposed to know what is your code displaying for each textarea

dire orchid
#

okay thx

dire orchid
#

does anybody has a list of html style stuff that i can use inside of the ui's like this
<p align=''><font size=''>

tulip lily
#
local textAreaInfo = {}

do
  local original_addTextArea = ui.addTextArea
  function ui.addTextArea(id, ...)
    textAreaInfo[id] = arg
    original_addTextArea(id, table.unpack(arg))
  end
end
tulip lily
#

What also works is <a href="event:data">, <B>, <font color="">, <I> and <font size="">

#

<img> works internally but tig disabled so lua modules cannot load external images

dire orchid
#

how can i do

indexTable[i] = indexTable[i] + 1

if indexTable[i] is nil and i can't reset it

hidden trail
#

Check if it's not nil first then add

if indexTable[i] then
    indexTable[i] = indexTable[i] + 1
end 

Or else do it like this (sorta intermediate knowledge)

indexTable[i] = (indexTable[i] or 0) + 1
#

to understand what's happening in the latter example, check these one by one

print(nil)
print(nil or 1)
print(3 or 1)
indexTable = {}
i = 1

-- important stuff below
print(indexTable[i])
print(indexTable[i] or 1)
indexTable[i] = 3
print(indexTable[i])
print(indexTable[i] or 1)
#

Learn by doing it. If you observed slowly you'll notice it picks the first value which is not nil when chained with ors (print(nil or novalue or 10 or 3))

whole tide
#

hot

dire orchid
#

Thank you! love keep learning new stuff

dire orchid
#

how do i make timer / countdown

tulip lily
#
local countdown = 10;

-- Called every 500ms
function eventLoop()
  if (countdown > 0) then
    print(countdown)
    countdown = countdown - 0.5
  end
end
hidden hinge
#

I want to generate a random bool value but lua is generating the same values. What is the problem?

#
function generateRandomBoolean()
  if math.random(1) then
    return true
  end
  return false
end

for i = 0, 9 do
  for j = 0, 1 do
    print(generateRandomBoolean())
  end
end

rugged canopy
hidden hinge
tulip lily
#
function generateRandomBoolean()
  return math.random(2) == 1
end
hidden hinge
#

Can i freeze a player?

tulip lily
hidden hinge
#

Thanks.

tight spindle
tulip lily
#

this is always up to date

tight spindle
#

thank you

mild sage
dire orchid
dire orchid
#

how can i delete npc or move it

tulip lily
tulip lily
tight spindle
#

that lua code for module is only active on tribe's house?

#

what do i have to do to make it appear on the module section in the game?

mild sage
tulip lily
#

If your minigame becomes popular, chances are it will end up becoming an official module

tight spindle
#

oh, thanks c:

dire orchid
#

where can i find particle list?

#

or how to use the function

tight spindle
#

i put lua script on the /lua in a tribe house and i send it, how can i execute that script?

dire orchid
#

like you said ^

#

probably your script has some bugs / mistakes

#

@tight spindle

tight spindle
dire orchid
#

when u run your script it automatically opens this chat.

dire orchid
#

can someone get me the list of all objects id and particles id

tulip lily
tulip lily
dire orchid
#

i would love to get an example of tfm.exec.physicobject function code, i can't make it right its strange

tulip lily
#
-- id, x, y, table with settings
tfm.exec.addPhysicObject(1, 400, 200, {
  type = 0, -- wood
  width = 400,
  height = 400
})
dire orchid
#

why it has so many properties?

#

i tried a table will all of those settings but its not working with them all

tulip lily
#

Because you are spawning a ground... have you never used the map editor? Grounds have several properties.

dire orchid
#

lol i made a lot of maps with mechanics so i know how to

#

if i try to make a table with all of the properties above together its not working

tulip lily
#

Maybe there is some mistake, see #Lua

dire orchid
#

no mistakes

tulip lily
#

You don't have to use them all either, they are optional

dire orchid
#

i tried few times to write the variables again

tulip lily
#

Show code

dire orchid
#

imma do it again, 1 sec

tulip lily
dire orchid
#
local tab = {2,100,50,false,0,0,0,0,true,true,false,true,0,0,0,true}

tfm.exec.addPhysicObject(1,200,200,tab)
#

it makes the wood, but 1x1 without the properties.

#

even with

local tab = {2,100,50}

tfm.exec.addPhysicObject(1,300,300,tab)

the width / height doesn't change

tulip lily
#

Wrong way...

dire orchid
#

did i make a mistake?

tulip lily
#

Yes, see my code

dire orchid
#

ohhhh

#

type =

tulip lily
#

You are using table like array, bodyDef expects properties not indexes

dire orchid
#

i always forget that i need to add the names

tulip lily
#

It's not wrong but it doesn't work in situations where an API expects a property.

dire orchid
#

thanks!

tulip lily
#

Sure

tight spindle
#

is there any way to get the transformice lua api on sublime text?

#

I already have it for Lua, but i want to use the transformice api

#

I just found a project of it, but is for v0.24, six years ago

dire orchid
#

what am i doing wrong?

local properties = {type=4,width=110,height=10}

tfm.exec.addPhysicObject(11,1411,361,properties)

tfm.exec.movePhysicObject(11,1521,361)
tulip lily
#

There is no movePhysicObject so much so that if you looked at #Lua you would see that there was an error.

tulip lily
#

Oh, lmao, i forgot

tulip lily
hazy cloak
#

can't we use the system.newTimer function in our tribe house?

mild sage
#

Nope, it's only available to Module Team due to its intensive use of server resources

hazy cloak
#

okay thank you

tight spindle
#

I could share you a repo that I found yesterday about timers function without the newTimer one

#

It's for the tfm lua api

hazy cloak
#

sure would be great

tight spindle
#

look

hazy cloak
#

thank you!

tight spindle
tight spindle
#

is there any way to play my module on a cicle into the tribe's house? I mean, when a round is over play it again without send the code again on the /lua page

tulip lily
#

Then you need to specify how your module works if you want any tips about it, for example, Batata minigame works by time or last survivor, when time runs out or when there is only one player left, a new map starts and the parameters reset

tight spindle
#

I've create a logic using the eventPlayerDied, when someone dies I compare the playerList, and If it is only 1 player, I call an exec.playerVictory, but I don't know if that works properly

dire orchid
#

it is just disappearing

random rose
#

does anoyone know that one module where u can edit the map while testing it

#

without leaving the room

hidden trail
#

It's a submodule of #ninguem iirc

random rose
#

huh ok

random rose
#

sandbox?

hidden trail
#

yup

random rose
#

ok itho

#

i got no idea how it even works

karmic fable
#

Does anyone know that one module, sorta like flood where you have to go to space

inland root
#

does anyone knows the module when there was 1 person choosed and other people had to disguise as items placed around the map by pressing space? after some time the choosed person spawned and they could seek the people by pressing space and morting them??

static meadow
#

#prophunt

dire orchid
#

what is the name of the funcorp room

#

i remember a room for everyone to use funcorp stuff like mice color / size and stuff

mild sage
#

*strm_Vnklacnkfho#0000 ?

digital igloo
#

anyone?

alpine loom
#

h

ionic path
digital igloo
#

thank you!

cobalt saffron
#

Can you check if someone is online with playerData?

hidden trail
#

Yep, unless the player data failed to load - which is rare tho

cobalt saffron
#

Do you require to have data saved?

mild sage
#

no

tulip lily
#

.> so you can always tell if a player is online or offline regardless of which room they are in?

#

That way it's even possible to check the times when Tig enters the game :v that is, if he enters.

mild sage
#

It's even possible to check when does Contistente enter the game monster

tulip lily
#

๐Ÿ˜ถ