#Problem with code

1 messages · Page 1 of 1 (latest)

timber cipher
#

Hello, i try to make mod for my map. The trigger are here but in game its not here. Idk why

rocky harbor
#

I assume not your mod one

timber cipher
timber cipher
short falcon
#

did you link your DLL in the everest.yaml file?

timber cipher
short falcon
#

and the file bin/NeikkoworldMod.dll exists?

timber cipher
short falcon
#

ahh, I see it

#

you need to add #[CustomEntity("NeikkoworldMod/BossEntryTrigger")] above your public class BossEntryTrigger : Trigger line

#

so the game knows that NeikkoworldMod/BossEntryTrigger in the map data means it should load your entity

timber cipher
#

uuuuuuh...

short falcon
#

yes

timber cipher
#

i don't understand where to put in the code

short falcon
#

above public class BossEntryTrigger : Trigger

timber cipher
#

like this?

short falcon
#

you forgot the # in front of it

timber cipher
short falcon
#

oh……

#

sorry, I coded too much PHP recently

timber cipher
#

sorry im new for coding for celeste ^^"

short falcon
#

ok, without the # is right

timber cipher
#

and now i can compile?

short falcon
#

yes

timber cipher
#

oh and for the .dll do i need to past in bin folder or the neikkoworldmod folder?

short falcon
#

it should appear automatically in the right location when you compile

timber cipher
#

he go automatically in bin folder

short falcon
#

yes

#

and your everest.yaml says it's in the bin folder

#

so the game knows it is in the bin folder

timber cipher
#

i compile him, im gonna try

short falcon
#

yes, do it

timber cipher
#

nop it does nothing

#

but he's here

short falcon
#

do you see the trigger in hitbox view?

#

you can also check your log.txt file, it will tell you if the trigger failed to load

timber cipher
#

how can you activate trigger hitbox?

short falcon
#

enable debug mode in the Mod Options and press ~ or . or `

#

you can also use CelesteTAS mod for better hitboxes

timber cipher
#

nothing here

short falcon
#

ok, so you should check your log.txt file

timber cipher
#

its in appdata?

#

or just in celeste folder?

short falcon
#

yes

timber cipher
#

i find something

short falcon
#

so, the game doesn't find your Trigger class

timber cipher
#

i don't know what i am doing wrong

short falcon
#

you're sure you compiled?

#

and restarted the game?

timber cipher
#

dotnet build
PS C:\Program Files (x86)\Steam\steamapps\common\Celeste\Mods\NeikkoworldMod> dotnet build
Restoring projects...
All projects are up-to-date for restore.
NeikkoworldMod -> C:\Program Files (x86)\Steam\steamapps\common\Celeste\Mods\NeikkoworldMod\Source\bin\Debug\net8.0\NeikkoworldMod.dll

Build succeeded.
0 Warning(s)
0 Error(s)

Elapsed time 00:00:01.09

#

the build have no error

#

i restarted the game but nothing change

#

i try to find but nobody have this problem

#

if its useful i use net.8

#

do i need to use net but in version 5?

rocky harbor
#

No

#

Can you link this in code modding

timber cipher
#

Link this conversation?

rocky harbor
#

Yeah

#

There's more people there

timber cipher
#

How do you do this?

rocky harbor
#

Since it's not a forum

#

The link is this

#

#1484563057324593303 message

timber cipher
#

Oooooh

#

Thanks

#

Problem with code

rocky harbor
#

No more porblem, huh

timber cipher
#

Yes

sweet hare
#

@timber cipher please compile in release mode and send the zip

timber cipher
#

you want this?

sweet hare
#

i asked you to compile in release mode and send the zip outputted by that, but whatever, this will work

timber cipher
#

oh sorry I didn't understand ^^"

sweet hare
#

as i expected, the class isn't even in the assembly

timber cipher
#

oh its not visual studio code

sweet hare
#

i personally wouldn't recommend using vscode for c# development

sweet hare
#
  1. your Code folder must be in the Source folder. the compiler literally won't see your .cs files otherwise.
  2. i suggest keeping your namespaces consistent with other mods', like Celeste.Mod.NeikkoworldMod. it won't break your code but having everything under one namespace is convenient.
  3. i also advise not counting on an ai to help you with celeste modding. it has absolutely no idea what it does and often writes code that either doesn't compile, or straight up doesn't work at all. for example, in BossEntry.cs:
    • line 30: Seeker does not have a constructor with a single Vector2 argument.
    • line 48: the event event:/game/05_mirror_temple/seeker_scream does not exist
    • line 55: Session does not have the LightingAlpha field
    • line 60: the event event:/bosspart1 does not exist (but i assume it may in the future)
timber cipher
#

i use chatgpt because i dont find what i searched

#

but i don't know why he build automatically in the source folder

#

which one you use for coding?

sweet hare
#

"which one" of what?

#

what IDE? the wiki recommends rider or visual studio, with vscode being last

timber cipher
#

and for the line 60 its my music for the boss that why

timber cipher
sweet hare
#

the reason rider or visual studio are recommended first is because they are proper integrated development environments, they show you errors and warnings directly in the editor without having to compile, as well as letting you see what's under a class

#

visual studio code doesn't give you this unless you know what you're doing

#

and even then in my experience it's worse compared to rider or visual studio

#

i also recommend reading up on the everest wiki and asking real people in #code_modding than an ai

timber cipher
#

i use the everset wiki but for the ai i asked him to explain parts to me because sometimes i don't really understand what to do

sweet hare
#

the second part still applies

timber cipher
#

i'm gonna delete the mod and retry with rider

sweet hare
#

imo there's no need

#

just move the files in the Code folder to the Source folder and fix the namespaces

#

...and the code that won't compile

timber cipher
#

i use this command for example for entities and triggers
dotnet new celestemod --Samples

sweet hare
#

that's fine yeah, but imo you don't have to

timber cipher
#

In the end, I prefer to retry because i don't really understande what i'm doing

#

that better

#

now time to understand how its workcateline

sweet hare
#

if you need help figuring things out, #code_modding is checked more often than some random #953393160464269402 post

#

but i'm afraid you will need to know how to write c#

timber cipher
#

okay thanks ^^

timber cipher
sweet hare
#

there's several articles like i mentioned earlier