Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Climbing Toggle and Give Skill Points #44

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,8 @@ typings/
# Session data
sessions/

# Credentials
data/credentials.json

# Builds
attPrefabulator-*
8 changes: 8 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ISC License

Copyright 2019 TwidgeVR
Copyright 2022 Jaredy00

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
# attprefabulator
# Credits
Prefabulator was made by Twidge https://github.com/TwidgeVR

This version of prefabulator uses most of his code

All I did was make some minor ajustments as well as add some new features

# attprefabulator
Add, remove and modify prefabs in A Township Tale

This browser based application gives a click-driven abstraction to the A Township Tale console's command set

### Download
You can download the latest (Windows) executable version of Prefabulator here:
https://github.com/edencomputing/attprefabulator/releases/
https://github.com/Jaredy00/attprefabulator/releases/

<a href="https://github.com/edencomputing/attprefabulator/releases/"><img src="public/images/prefabulator_controls.png" width="30%" height="30%" alt="Prefab Controls"></a>
<a href="https://github.com/Jaredy00/attprefabulator/releases/"><img src="public/images/prefabulator_controls.png" width="30%" height="30%" alt="Prefab Controls"></a>

### Release Notes
- v1.9.2 - Fixed Copy button to spawn items based on original player it was spawned on

- v1.9.1 - Items spawned on other players in the gift tab are now controllable from the control tab

- v1.9.0 - Fixed Set-Home, Updated Teleport locations, Added Tab for giving players levels and Updated Server settings

- v1.8.2 - Fixed an issue with connecting to servers. Disabled the hand camera follow feature, this is too resource intensive on the server right now. Added a new app icon by Gasher! Thanks Gasher!

- v1.8.1 - Added touch input support, which also fixes using Control buttons with Oculus touch trigger input. Updated some dependencies that had security concerns.
Expand Down Expand Up @@ -73,7 +85,7 @@ https://github.com/edencomputing/attprefabulator/releases/
## Usage

It's recommended to use the latest release version found here:
https://github.com/edencomputing/attprefabulator/releases/
https://github.com/Jaredy00/attprefabulator/releases/

Simply download the version for your operating system, extract the files, and run attPrefabulator

Expand All @@ -92,7 +104,7 @@ At this point, restart your PC to make sure the PATH is correctly set
Open a command prompt or terminal and type

```
git clone https://github.com/edencomputing/attprefabulator.git
git clone https://github.com/Jaredy00/attprefabulator.git

cd attprefabulator/
```
Expand Down
96 changes: 82 additions & 14 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1400,8 +1400,8 @@ wsAddHandler( 'player_set_home', async (data) => {
switch( message.data.Command.FullName )
{
case "player.detailed":
let posString = message.data.Result.Position.replace(/[()\ ]/g, '')
let npos = posString.split(',')
let npos = message.data.Result.Position
console.log(`"${npos[0]},${npos[1]},${npos[2]}"`)
console.log( `new player home position: ${player} `, npos )
await attConsole.send(`player set-home ${player} "${npos[0]},${npos[1]},${npos[2]}"`)
break
Expand Down Expand Up @@ -1948,12 +1948,20 @@ server.post('/ajax', asyncMid( async( req, res, next ) => {
let gmplayer = ( !!req.body.player )
? req.body.player
: userId
let state = (req.body.value == "true")
command = `player god-mode ${gmplayer} ${state}`
let gmstate = (req.body.value == "true")
command = `player god-mode ${gmplayer} ${gmstate}`
console.log( command )
await attConsole.send( command )
return
case "set_player_climbing":
let cplayer = ( !!req.body.player )
? req.body.player
: userId
let cstate = (req.body.value == "true")
command = `player set-unlock ${cplayer} 'Climbing Unlock' ${cstate}`
console.log( command )
await attConsole.send( command )
return

case "get_player_list":
command = "player list"
console.log( command )
Expand Down Expand Up @@ -1994,16 +2002,76 @@ server.post('/ajax', asyncMid( async( req, res, next ) => {
return;

case "player_kick":
if ( !!req.body.player )
{
command = "player kick "+ req.body.player
console.log( command )
await attConsole.send( command )
} else {
res.send({'result': 'Fail'})
}
if ( !!req.body.player )
{
command = "player kick "+ req.body.player
console.log( command )
await attConsole.send( command )
} else {
res.send({'result': 'Fail'})
}
return;

case "player_level_up_mining":
if ( !!req.body.player )
{
command = "player progression pathlevelup "+ req.body.player + " Mining"
console.log( command )
await attConsole.send( command )
} else {
res.send({'result': 'Fail'})
}
console.log(`${req.body.player} Levelup in Mining`)
return;

case "player_level_up_woodcutting":
if ( !!req.body.player )
{
command = "player progression pathlevelup "+ req.body.player + " WoodCutting"
console.log( command )
await attConsole.send( command )
} else {
res.send({'result': 'Fail'})
}
console.log(`${req.body.player} Levelup in WoodCutting`)
return;

case "player_level_up_melee":
if ( !!req.body.player )
{
command = "player progression pathlevelup "+ req.body.player + " Melee"
console.log( command )
await attConsole.send( command )
} else {
res.send({'result': 'Fail'})
}
console.log(`${req.body.player} Levelup in Melee`)
return;


case "player_level_up_ranged":
if ( !!req.body.player )
{
command = "player progression pathlevelup "+ req.body.player + " Ranged"
console.log( command )
await attConsole.send( command )
} else {
res.send({'result': 'Fail'})
}
console.log(`${req.body.player} Levelup in Ranged`)
return;

case "player_level_up_forging":
if ( !!req.body.player )
{
command = "player progression pathlevelup "+ req.body.player + " Forging"
console.log( command )
await attConsole.send( command )
} else {
res.send({'result': 'Fail'})
}
console.log(`${req.body.player} Levelup in Forging`)
return;

default:
res.send({'result':'Unknown Endpoint'})
return;
Expand Down
Loading