#[Solved] Teleporter event question

1 messages ยท Page 1 of 1 (latest)

knotty scroll
#

I'm trying to set up a teleporter and looking at the Academy to Church of Vows teleporter as an example. But I'm not sure what the 3024188 is supposed to be in this: InitializeCommonEvent(0, 90005605, 14001660, 3024188, 1037462650, 14000000, 14002660, 14002661, 14002662, 0, 0, 0, 0);

lunar rose
#

ah yeah, I see the issue

#

that number represents the combined first 4 arguments of the WarpPlayer instruction

#

it's a bit of a special case, because those arguments are 1 byte each, rather than the usual 4 bytes

#

so darkscript reads them all as one argument

#

I can't remember how you convert it to the 4 arguments it's supposed to be, but considering the destination of the warp, that number should stand for 60, 37, 46, 0

#

that being the map code for church of vows

#

it's a bit of a pain because if you want to use that common_func for your own purposes, you need to do the same conversion in the opposite direction, and I'm not sure how that works, need to look into it

#

if you try to use 4 separate 1-byte arguments there, the game will most likely crash on load, because darkscript interprets each argument as the full 4 byte length

knotty scroll
#

I'm sorry, I'm unsure if I understood everything you explained. But I can understand that there are some difficulties.

#

So, how do I figure out the first 4 arguments of the WarpPlayer instruction and do the same conversion in the opposite direction?

lunar rose
#

#elden-ring-modding message

#

yeah it's not exactly a beginner emevd topic

#

I haven't actually messed with it myself yet

#

tbh to avoid all this, if I were to do stuff with waygates I'd just create my own separate event in common_func

#

copying the existing event 90005605, but changing those four 1-byte arguments to be 4-bytes instead

#

then I'd be able to initialize that event with the 4 usual map ID arguments, instead of having to do conversions and what not

#

so basically:

$Event(90005605, Restart, function(X0_4, X4_1, X5_1, X6_1, X7_1, X8_4, X12_4, X16_4, X20_4, X24_4, X28_4, X32_4, X36_4, X40_4)

would become

$Event(90005699, Restart, function(X0_4, X4_4, X8_4, X12_4, X16_4, X20_4, X24_4, X28_4, X32_4, X36_4, X40_4, X44_4, X48_4, X52_4) {

#

discord formatting pls

#

if you don't know how parameterized events work this probably flies completely over your head tho ๐Ÿ˜…

knotty scroll
#

I'm trying to understand...

lunar rose
#

#modmaking-help message

#

I explained it to someone else there

knotty scroll
#

How can setting up a single teleporter be this difficult...

lunar rose
#

such is life when you're decompiling code in a game not designed to be modded ๐Ÿ˜…

#

it's a bit of a limitation in darkscript at the moment

#

it may be easier to just try the conversion method

#

I want to learn this myself anyway

#

also, there are many other ways to do warps

#

you don't necessarily have to use the existing event for waygates

#

you could also create your own which waits for the player to interact with the waygate (or whatever object you choose), shows a yes/no prompt and warps the player if they select yes

#

I helped someone make something similar recently, to revive a boss

#

also involved a warp for that matter, to reload the area

#

for now let me just look into the parameter conversion method

#

it may be easier than we think

#

yep, following matt's instructions from the message I linked earlier

#

3024188 is equal to 60, 37, 46, 0 as I guessed

#

so you can easily do it the other way around with that tool

#

what map would you want to warp to?

knotty scroll
#

Roundtable Hold

lunar rose
#

alright, do you know how to find the map code for that?

knotty scroll
#

No

lunar rose
#

easiest way would be with the map editor in smithbox, since it has a search field

#

but it's also doable manually in darkscript

#

11 10 00 00

#

the result is 2571

#

that would be the number you'd need to use in the event initialization, instead of 3024188

#

you need to do more things though, you also need a spawn point entity ID

#

you can find them with smithbox's map editor

#

(and create a spawn point if needed, but I imagine not in this case)

knotty scroll
#

I'll try and let you know how it goes

lunar rose
#

sure, feel free to ask anything ๐Ÿ‘

knotty scroll
#

It keeps intensifying, and I can't even interact with the teleporter

lunar rose
#

lmao I've seen that mentioned before

#

I don't know why it happens, but it's probably some parameter not being correct

knotty scroll
#

some parameter?

#

What do you mean?

lunar rose
#

idk, just guessing, I've never implemented one of those

#

I was looking at the event itself but I can't find anything related to that behavior

knotty scroll
#

my save is just haunted Ig

#

So what now?

#

Should I change the post to: [UNSOLVED]?

lunar rose
#

if you want

#

can you post your event initialization?

knotty scroll
#

Here: InitializeCommonEvent(0, 90005605, 24001660, 2571, 2037462650, 24000000, 24002660, 24002661, 24002662, 0, 0, 0, 0);

lunar rose
#

and you added this to the chapel of anticipation map, is it?

knotty scroll
#

yes, that I did

lunar rose
#

ok, so you're using entity ID 24001660

#

you gave this waygate that entity ID in the map editor?

knotty scroll
#

yes

lunar rose
#

2037462650 is the spawn point entity ID parameter, it's still pointing to the church of vows

#

shouldn't be the cause of these problems, but still something you'll need to fix

#

you need to replace it with a spawn point entity ID from the roundtable

#

they're in region > spawnpoint

#

11102020 is the typical spawnpoint at the table

knotty scroll
#

Okay, I'll try

#

still the same

lunar rose
#

still can't interact?

knotty scroll
#

yep

lunar rose
#

as I said, I doubted that would be the cause

#

still looking into it

knotty scroll
#

let me know if you find anything

lunar rose
#

I was looking at #elden-ring-modding message

#

but I think you're already doing everything right based on that

#

so idk

#

ok, try changing 24000000 to 0

knotty scroll
#

right

lunar rose
#

hmm... I wonder if these event flags are valid, too

#

24_00_00_00 is not an existing map after all

knotty scroll
lunar rose
#

alright, let's try this

#

change:

the waygate's entity ID 24001660 to 10011990, both in the event script and in the map editor

knotty scroll
#

only the waygate's entity ID?

lunar rose
#

24002660, 24002661, 24002662
to
10012990, 10012991, 10012992

knotty scroll
#

gotcha

lunar rose
#

err wait no

#

scratch that last one

knotty scroll
#

last one, you mean 24002662 to 10011992?

lunar rose
#

I fixed it

knotty scroll
#

I see

lunar rose
#

yeah so those are event flags

#

I was using 1xxx before which is permanent flags, shouldn't be used for interactions like this

#

need 2xxx instead

#

and it also follows the vanilla convention of the event flags being entity ID +1000

#

which may be important

#

there's a lot of stuff like that

#

according to the message I linked those flags also control the vfx somehow

#

which I would have never guessed

knotty scroll
#

It worked

lunar rose
#

nice!

#

praise the arcane knowledge of discord users

knotty scroll
#

praise be

lunar rose
#

had to dig a fair bit in discord search to find that lol

knotty scroll
#

Well, thanks for taking your time to help me

#

I really appreciate it

lunar rose
#

no problem

#

so yeah, the lesson: follow vanilla conventions as much as possible :D

#

usually when numbers are set up a certain way, there's a reason for it

knotty scroll
#

Lesson learned ๐Ÿ™‚

#

[Solved] Teleporter event question

lunar rose
#

and it's always a good idea to use existing map IDs as base for custom ones

#

like here, for the entity ID of the waygate, I used 1001 as base (the chapel of anticipation map code)

#

then 1990

#

1xxx is the convention for asset objects

knotty scroll
#

Ah, that makes sense

lunar rose
#

sometimes important

#

and 990 is just a number high enough to not be used by anything in vanilla

#

then those 3 other arguments are always the entity ID +1000, +1001, +1002