Skip to content

colemancda/Valhalla

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alt text

Actions Status

What is this?

This project exists to preserve and archive an early version of the game (v28 of global)

Client modifications

  • 00663007 - change to jmp for multiclient
  • 0041BD17 - fill with nop to remove internet explorer iframe advert after client close
  • 0066520B - push to stack resolution in y
  • 00665211 - push to stack resolution in x
  • 0066519c - mov 0x0 instead of 0x10 for windowed mode

Features

General:

  • Simulated latency with jitter (set in config) to make dev environment simulate a real world connections when within network

Login server:

  • Login user
  • Show EULA on first login
  • Perform gender select on first login
  • Pin
  • Display world ribbons
  • Display world messages
  • Display world status (e.g. overpopulated)
  • World selection
  • Lock character creation on world if full
  • Channel selection
  • Create character
  • Delete character
  • Migrate to channel server
  • Show worlds, channels, world status etc from information sent from world server
  • Prevent players from accessing dead channel
  • Server resets login status upon restart for dangling users

World server:

  • Keep track of player count
  • Send information to login server
  • Send IP, port to channel for change channel requests
  • Forward player connects to channels
  • Forward player leaves game to channels
  • Broadcast buddy events
  • Broadcast party events
  • Broadcast guild events
  • Forward whispers
  • Allow gm command to activate exp/drop changes across all channels
  • Allow gm commands to update information displayed at login

Cashshop server:

  • List items
  • Allow purchases via different currencies

Channel server:

  • GM commands
  • Players can see each other
  • Player can change channel
  • Players can see other movement
  • Player chat
  • player use portal
  • Player allocate skill points
  • Player stats
  • Player use skills
  • Player skill logic (haste etc)
  • Player inventory (needs a re-write)
  • Player use item (scrolls, potions etc)
  • Player drop item(s)
  • Player pets
  • NPC visible
  • NPC movement
  • NPC basic chat
  • NPC shops
  • NPC stylist
  • NPC storage
  • PQ scripts
  • Event scripts
  • Load scripts from folder (incl. hot loading)
  • Map instancing
  • Mob visible
  • Mob movement
  • Mob attack
  • Mob skills that cause stat changes
  • Mob death
  • Mob respawn
  • Mob spawns mob(s) on death
  • Mob drops
  • Mob boss HP bar
  • Minigames
  • Whisphers
  • Find / Map in buddy window
  • Buddy list
  • Buddy chat
  • Party
  • Party chat
  • Guild
  • Guild chat
  • Trade
  • Communication Window
  • Quests
  • Reactors
  • Autonomous GM commands which can be started and stopped at will
  • Server resets login status upon restart for dangling characters

Metrics:

  • Channel population
  • Server thread count (OS and Go)
  • Server memory usage (heap and stack)
  • Monster kill rate
  • Ongoing trades
  • Ongoing minigames
  • Ongoing npc script interactions

See screenshots section for an example Grafana dashboard

TODOs

  • Profile the channel server and do the following:
    • Reduce branches in frequent paths
    • Determine which pieces of data if any provide any benefit in being converted SOAs
  • Implement AES crypt (ontop of the shanda) and determine how to enable it in the client
  • Clean up passing nil to interface type function, should be new(type) as this causes nasty to find bugs as the nil value is not the interface itself but the value it holds
  • Move player save database operations into relevant systems

Acknowledgements

  • Sunnyboy for providing a list of idbs for which this project would not have started
  • The following projects were used to help reverse packet structures that were not clearly shown in the idb
  • NX file format (see acknowledgements at link)

NPC chat display info (use this when scripting NPCs)

NPCs are scripted in javscript powered by goja

Taken from here

  • #b - Blue text.
  • #c[itemid]# - Shows how many [itemid] the player has in their inventory.
  • #d - Purple text.
  • #e - Bold text.
  • #f[imagelocation]# - Shows an image inside the .wz files.
  • #g - Green text.
  • #h # - Shows the name of the player.
  • #i[itemid]# - Shows a picture of the item.
  • #k - Black text.
  • #l - Selection close.
  • #m[mapid]# - Shows the name of the map.
  • #n - Normal text (removes bold).
  • #o[mobid]# - Shows the name of the mob.
  • #p[npcid]# - Shows the name of the NPC.
  • #q[skillid]# - Shows the name of the skill.
  • #r - Red text.
  • #s[skillid]# - Shows the image of the skill.
  • #t[itemid]# - Shows the name of the item.
  • #v[itemid]# - Shows a picture of the item.
  • #x - Returns "0%" (need more information on this).
  • #z[itemid]# - Shows the name of the item.
  • #B[%]# - Shows a 'progress' bar.
  • #F[imagelocation]# - Shows an image inside the .wz files.
  • #L[number]# Selection open.
  • \r\n - Moves down a line.
  • \r - Return Carriage
  • \n - New Line
  • \t - Tab (4 spaces)
  • \b - Backwards

Screenshots

Bosses

Metrics

About

A Golang MapleStory (v28) server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 95.2%
  • JavaScript 2.3%
  • Awk 2.2%
  • Other 0.3%