rychard / gnomeserver Goto Github PK
View Code? Open in Web Editor NEWIntegrated Web Server for Gnomoria
License: MIT License
Integrated Web Server for Gnomoria
License: MIT License
Currently, all the skills are exposed in one group that doesn't differentiate between production skills and combat skills, which can be misleading since (to my knowledge) Professions don't include combat skills in the list of skills which they "allow", which causes those skills to appear as though they are unused by any profession.
Skills should be exposed via the API separately for production skills and Combat skills.
From Roest (@rschurade) on the Gnomoria Forums: http://forums.gnomoria.com/index.php?topic=8123.msg61495#msg61495
When trying to build the master branch, there is a lot of errors. Could this be because the Gnomoria RC version has gone up a few?
Severity Code Description Project File Line
Error Build: Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 32
Error TS2503 Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\gnome\index.ts 16
Error Build: Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\gnome\index.ts 16
Error Build: Statements are not allowed in ambient contexts. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\Interfaces.d.ts 1
Error Build: Cannot find name 'ErrorGeneratingOutput'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\Interfaces.d.ts 1
Error TS1036 Statements are not allowed in ambient contexts. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\Interfaces.d.ts 1
Error TS2304 Cannot find name 'ErrorGeneratingOutput'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\Interfaces.d.ts 1
Error Build: Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 2
Error TS2503 Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 2
Error Build: Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 6
Error TS2503 Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 6
Error Build: Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 10
Error TS2503 Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 10
Error Build: Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 14
Error TS2503 Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 14
Error Build: Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 27
Error TS2503 Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 27
Error Build: Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 28
Error TS2503 Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 28
Error Build: Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 29
Error TS2503 Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 29
Error Build: Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 30
Error TS2503 Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 30
Error Build: Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 31
Error TS2503 Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 31
Error TS2503 Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 32
Error Build: Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 61
Error TS2503 Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 61
Error Build: Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 62
Error TS2503 Cannot find namespace 'GnomeServer'. GnomeApp C:\Users\Temeez\Desktop\GnomeServer-master\GnomeApp\app\models\models.ts 62
The API should allow various operations on the enemies in the game.
The following is an incomplete list of things necessary for this:
Perhaps just as importantly, this functionality should be made available within the web application.
From Roest (@rschurade) on the Gnomoria Forums: http://forums.gnomoria.com/index.php?topic=8123.msg61495#msg61495
It would help to note compiling is known functional with visual studio 2015. I tested with 2015 community edition and it worked. It didnt work with Visual studio 2008 express or 2012.
The API should allow the data for Gnomes to be edited and written back into the game.
The following is an incomplete list of things necessary for this:
Perhaps just as importantly, this functionality should be made available within the web application.
From Roest (@rschurade) on the Gnomoria Forums: http://forums.gnomoria.com/index.php?topic=8123.msg61495#msg61495
Hey!
There doesn't seem to no mention about the Newtonsoft.Json framework which the project needs to be installed in the README Installation part. Might want to add that at some point :)
Secondly: Awesome job! It is nice to see that the [Game X]Server idea didn't stop to Cities Skylines.
Gnomoria allows users to customize the location of their save games via the presence of a Game.ini
file in the same directly as Gnomoria.exe
.
When a path is correctly configured in this file, the game will use that directory for all game saves. Mods should respect this configuration value as well.
The API should allow neighboring kingdoms to be edited and written back into the game.
The following is an incomplete list of things necessary for this:
SubType
defined in faction.xml
?
Merchant City-State
Goblin Kingdom
Mining Colony
Lumber Camp
Agricultural Settlement
Perhaps just as importantly, this functionality should be made available within the web application.
From Roest (@rschurade) on the Gnomoria Forums: http://forums.gnomoria.com/index.php?topic=8123.msg61495#msg61495
Also mentioned here:
Throughout development, I've encountered only a handful of crashes that were the direct result of accessing objects across thread boundaries.
Modifying existing objects seems to be safe (in practice, but this is not an acceptable excuse), but creating or removing items that exist as part of a collection can easily cause Gnomoria to crash if those collections are enumerated frequently, or if enumeration within the Gnomoria process takes an extended period of time to complete. The issue is unlikely to occur in reverse, as the web server itself is only executing code against Gnomoria when a request is received, and the Try
/Catch
blocks that surround the invocation of this code would capture any exceptions thrown in this scenario. The server would send the error as the body of the response, but the Gnomoria process is unlikely to be impacted.
A common scenario that can reliably result in a crash of the Gnomoria process involves the addition/creation of new Character
objects. The collection that keeps track of these references is regularly enumerated across many of the game's Update
methods, and modifying this from the web server thread (while Gnomoria is enumerating the collection) would throw an exception.
Note: For the uninformed, modifying a collection while it is being enumerated will cause the following exception to be thrown:
System.InvalidOperationException was unhandled Message="Collection was modified; enumeration operation may not execute." Source="mscorlib" StackTrace: at System.ThrowHelper.ThrowInvalidOperationException(...) at System.Collections.Generic.List`1.Enumerator.MoveNext()
During the execution of the GnomoriaInjection.Inject.Hook
method, we have access to the game's primary thread, and can create a dispatcher at this point, but this does nothing to provide us with the thread-safety we need. Since this method is invoked any time the GnomanEmpire.Instance
property is accessed, Gnomoria could be directly in the middle of enumerating one of these collections.
Instead, it might be wise to instead use a second hook that is invoked at the end of one of the game's many Update
methods. The master Update
loop should be safe to hook into, since I can't imagine a scenario that involves a collection being enumerated at this time.
I just realized that I don't have a LICENSE
file in this repository.
As a note (both to myself, as well as anyone else), the code in this repository will be placed under the MIT license:
Copyright (c) 2015 Joshua Shearer
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
I should be able to define multiple routes with the same path, so long as each route has only a single endpoint for each HTTP method (GET
, POST
, PUT
, DELETE
).
When resolving an endpoint, the parameters are not considered at all. Only after a endpoint is resolved are the QueryString parameters accessed, at which point we are unable to redirect the invocation.
Here are some notes regarding this:
Type
of parameter would introduce a lot of complexity, as it would lead to the suggestion of supporting complex-type binding. For now, let's keep it simple.Using the 0.1 release, after changing the path to my game, i receive this error
The API should allow for the ability to manipulate the items on the map or in stockpiles.
The following is an incomplete list of things necessary for this:
Strawberry Seeds: 100 (12345 Total)
Perhaps just as importantly, this functionality should be made available within the web application.
From Roest (@rschurade) on the Gnomoria Forums: http://forums.gnomoria.com/index.php?topic=8123.msg61495#msg61495
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.