Updated - v1.0.0
This commit is contained in:
107
README.md
107
README.md
@@ -1,27 +1,27 @@
|
|||||||
# NMSlib
|
# NMSlib
|
||||||
|
|
||||||
**master Branch** : 
|
[](COPYING)
|
||||||
|
[](https://godoc.org/gitlab.com/Raum0x2A/nmslib)
|
||||||
**develop Branch** : 
|
[](https://gitlab.com/Raum0x2A/nmslib)
|
||||||
|
[](https://gitlab.com/Raum0x2A/nmslib/-/tree/develop)
|
||||||
|
[](https://gitlab.com/Raum0x2A/nmslib/-/releases/v1.0.0)
|
||||||
|
|
||||||
NMSlib is a GoLang package for dealing with converting Galactic coordinates to Portal codes and vice versa.
|
NMSlib is a GoLang package for dealing with converting Galactic coordinates to Portal codes and vice versa.
|
||||||
|
|
||||||
NMSlib also translates in game languages (Korvax, Gek Vy'Keen and Atlas) to english, and create portal banners.
|
NMSlib also translates in game languages (Korvax, Gek Vy'Keen and Atlas) to english, and create portal banners.
|
||||||
|
|
||||||
[GoDoc](https://pkg.go.dev/gitlab.com/Raum0x2A/nmslib#section-documentation)
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
To install this module use `go get`
|
To install this module use `go get`
|
||||||
|
|
||||||
|
|
||||||
```bash
|
```golang
|
||||||
go get -u gitlab.com/Raum0x2A/nmslib
|
go get -u gitlab.com/Raum0x2A/nmslib
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
**Example:**
|
### Example:
|
||||||
|
|
||||||
```golang
|
```golang
|
||||||
package main
|
package main
|
||||||
@@ -40,20 +40,26 @@ func main() {
|
|||||||
}
|
}
|
||||||
fmt.Printf("Input:\t%s\nOutput:\t%s\n", portalcode, galacticCoords)
|
fmt.Printf("Input:\t%s\nOutput:\t%s\n", portalcode, galacticCoords)
|
||||||
|
|
||||||
nmslib.CreateBanner(portalcode, "./NMH-BlueDream.png", 0)
|
g2p, err := nmslib.Gc2p("014C:0077:06DA:01F2", 2)
|
||||||
nmslib.CreateBanner(RndPortal(), "./Random.png", 0)
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
fmt.Printf("Input:\t014C:0077:06DA:01F2\nOutput:\t%s\n", g2p)
|
||||||
|
|
||||||
|
_ := nmslib.CreateBanner(portalcode, "./NMH-BlueDream.png", 0)
|
||||||
|
_ := nmslib.CreateBanner(nmslib.RndPortal(), "./Random.png", 0)
|
||||||
|
|
||||||
fmt.Println(nmslib.Translate{Word: "KIHTYOMOLES"}.Kor2Eng())
|
fmt.Println(nmslib.Translate{Lang: "korvax"}.ToEng("KIHTYOMOLES"))
|
||||||
korvax := nmslib.Translate{Word: "Contraband"}
|
korvax := nmslib.Translate{"english"}
|
||||||
fmt.Println(korvax.Eng2Kor())
|
fmt.Println(korvax.ToKorvax("Contraband"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Creating a Glyph banner with CreateBanner()
|
## Creating a Glyph banner with CreateBanner()
|
||||||
|
|
||||||
This function takes 3 parameters:
|
This function takes 3 parameters and reurns an error
|
||||||
|
|
||||||
* portalcode: 12 char hex string of portal location
|
* portalcode: 12 char hex string of portal location
|
||||||
* savename: Save location and name
|
* savename: Save location and name
|
||||||
@@ -69,7 +75,10 @@ This function takes 3 parameters:
|
|||||||
Horizontal Layout for the NMH Capital planet [Blue Dream (aka Omins XI)](https://nomanssky.fandom.com/wiki/Omins_XI) in the [Notric-Lis XIII](https://nomanssky.fandom.com/wiki/Notric-Lis_XIII) system in the [Lahanhar Conflux](https://nomanssky.fandom.com/wiki/Lahanhar_Conflux) region
|
Horizontal Layout for the NMH Capital planet [Blue Dream (aka Omins XI)](https://nomanssky.fandom.com/wiki/Omins_XI) in the [Notric-Lis XIII](https://nomanssky.fandom.com/wiki/Notric-Lis_XIII) system in the [Lahanhar Conflux](https://nomanssky.fandom.com/wiki/Lahanhar_Conflux) region
|
||||||
|
|
||||||
```golang
|
```golang
|
||||||
nmslib.CreateBanner("21F2F8EDB94D", "NMH-BlueDream.png", 0)
|
err := nmslib.CreateBanner("21F2F8EDB94D", "NMH-BlueDream.png", 0)
|
||||||
|
if err !=nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
@@ -77,16 +86,18 @@ nmslib.CreateBanner("21F2F8EDB94D", "NMH-BlueDream.png", 0)
|
|||||||
Vertical layout for a random address
|
Vertical layout for a random address
|
||||||
|
|
||||||
```golang
|
```golang
|
||||||
nmslib.CreateBanner(nmslib.RndPortal(), "ranportal.png", 11)
|
err := nmslib.CreateBanner(nmslib.RndPortal(), "ranportal.png", 11)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
_Note: Images shown in readme.md have been scaled down in gimp._
|
_Note: Image shown in readme.md's vertical example have been scaled down in gimp for easier viewing on gitlab._
|
||||||
|
|
||||||
_Original Vertical: 256x3072px_
|
_Original ranportal.png: 256x3072px_
|
||||||
|
|
||||||
_Original: Horizontal: 3072x256px_
|
|
||||||
|
|
||||||
### Converting Portal code to Galactic address with P2gc()
|
### Converting Portal code to Galactic address with P2gc()
|
||||||
|
|
||||||
@@ -138,15 +149,17 @@ This function takes only 1 parameter and returns a string
|
|||||||
|
|
||||||
* Word: Any known Atlas word (ex. Paka)
|
* Word: Any known Atlas word (ex. Paka)
|
||||||
|
|
||||||
|
_note: Translating to english will **always** result in the lowercase equivilent word_
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
```golang
|
```golang
|
||||||
fmt.Println(nmslib.Translate{Word: "Paka"}.Atl2Eng())
|
fmt.Println(nmslib.Translate{Lang: "atlas"}.ToEng("Paka"))
|
||||||
```
|
```
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
|
|
||||||
``Awake``
|
``awake``
|
||||||
|
|
||||||
### Translate English to Korvax with Eng2Korvax()
|
### Translate English to Korvax with Eng2Korvax()
|
||||||
|
|
||||||
@@ -157,8 +170,8 @@ This function takes only 1 parameter and returns a string
|
|||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
```golang
|
```golang
|
||||||
korvax := nmslib.Translate{Word: "Contraband"}
|
korvax := nmslib.Translate{"english"}
|
||||||
fmt.Println(korvax.Eng2Kor())
|
fmt.Println(korvax.ToKorvax("Contraband"))
|
||||||
```
|
```
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
@@ -168,38 +181,54 @@ Output:
|
|||||||
|
|
||||||
### Language commands
|
### Language commands
|
||||||
|
|
||||||
Gek:
|
- ``Translate{Lang: ``string``}.ToEng(``string``)``
|
||||||
- ``Translate{Word: string}.Gek2Eng()``
|
- ``Translate{Lang: ``string``}.ToKorvax(``string``)``
|
||||||
- ``Translate{Word: string}.Eng2Gek()``
|
- ``Translate{Lang: ``string``}.ToGek(``string``)``
|
||||||
|
- ``Translate{Lang: ``string``}.ToVykeen(``string``)``
|
||||||
|
- ``Translate{Lang: ``string``}.ToAtlat(``string``)``
|
||||||
|
|
||||||
Korvax:
|
#### Possible Lang string options
|
||||||
- ``Translate{Word: string}.Kor2Eng()``
|
|
||||||
- ``Translate{Word: string}.Eng2Kor()``
|
|
||||||
|
|
||||||
Vy'keen:
|
- ``"english"``
|
||||||
- ``Translate{Word: string}.Vyk2Eng()``
|
- ``"korvax"``
|
||||||
- ``Translate{Word: string}.Eng2Vyk()``
|
- ``"gek"``
|
||||||
|
- ``"vykeen"``
|
||||||
|
- ``"atlas"``
|
||||||
|
|
||||||
Atlas:
|
|
||||||
- ``Translate{Word: string}.Atl2Eng()``
|
|
||||||
- ``Translate{Word: string}.Eng2Atl()``
|
|
||||||
|
|
||||||
|
|
||||||
## Random Portal address
|
## Random Portal address
|
||||||
### Create a random portal address
|
|
||||||
|
Generate random portal codes
|
||||||
|
- Atlas Station
|
||||||
|
- Black Hole
|
||||||
|
- Random address
|
||||||
|
|
||||||
|
All random address created will default to the planet index 1 to help ensure there the address is valid
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
```golang
|
```golang
|
||||||
fmt.Println(nmslib.RndPortal())
|
fmt.Println(nmslib.RndPortal())
|
||||||
fmt.Println(nmslib.RndPortal())
|
fmt.Println(nmslib.RndPortal())
|
||||||
|
fmt.Println(nmslib.RndAtlas())
|
||||||
|
fmt.Println(nmslib.RndBH())
|
||||||
```
|
```
|
||||||
|
|
||||||
**Output:**
|
**Output examples:**
|
||||||
|
|
||||||
``10EFABDEA373``
|
``10EFABDEA373``
|
||||||
|
|
||||||
``11EAB355FC8E``
|
``11EAB355FC8E``
|
||||||
|
|
||||||
## License
|
``107AC0E190D1``
|
||||||
[MIT](COPYING)
|
|
||||||
|
``10796D57AE15``
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
## A Proud member of NMH Hub
|
||||||
|
### [](https://nomanssky.fandom.com/wiki/No_Man%27s_High_Hub) [](https://discord.com/invite/dCFHwPz)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user