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

(ready) Fantasy name generator #363

Merged
merged 7 commits into from
May 31, 2018

Conversation

AquariusPower
Copy link
Contributor

@AquariusPower AquariusPower commented May 26, 2018

#362
all documentation for the pattern is at namegen.h
EDIT: btw, they use "unlicense"

@AquariusPower
Copy link
Contributor Author

AquariusPower commented May 26, 2018

what about use this to also give random names to mobs?
simplified ones, like only having the 1st name.

but for ex. kobolds could have some fixed name part or fixed second name (or some "fixed variations"), and so on to all other NPC types, but I am not good on naming and history/story and so on, so tips on this are welcome.

EDIT: this can be other time anyway

@AquariusPower AquariusPower changed the title Fantasy name generator (ready) Fantasy name generator May 26, 2018
@ryfactor
Copy link
Member

I can't seem to get this working, do you have example screenshots for how to configure?
I set the pattern to !ss !sV as suggested, however when I start a new character, the name field doesn't populate with the randomly generated name. I closed the application and re-opened and still no name.

@AquariusPower
Copy link
Contributor Author

AquariusPower commented May 29, 2018

if you have configured a default player name, it will override the random name, or is it coming empty?
I think if your default player name is "empty spaces" (not sure if possible tho) will look like empty but will have size>0 and will still override

@ryfactor
Copy link
Member

With no default name configured and with fantasy name pattern !ss !sV, when I start a new game, I get prompted for a new name and the field is empty.

@AquariusPower
Copy link
Contributor Author

AquariusPower commented May 30, 2018

to grant it's main code is working

cd fantasyname/
make
./namegen "!ss !sV" 10

if the above works,
I added some debug log messages,
after you try again to test, run this on a terminal:
cat $HOME/.ivan/.ivan.dbgmsg.log |egrep "FantasyName|Init"

but to enable the debug log you need to add these 2 files:
FeLib/Include/dbgmsg.h
FeLib/Source/dbgmsg.cpp
from https://github.com/AquariusPower/CppDebugMessages
(I also added them to my .gitignore)

dbgmsg.h
dbgmsg.cpp

And this to your cmake parameters:
-DCMAKE_CXX_FLAGS="-DDBGMSG"
(with wizard: -DCMAKE_CXX_FLAGS="-DDBGMSG -DWIZARD")

the log output here is like this:

 game.cpp:629:Init:{Name.CStr()}="";{ivanconfig::GetDefaultName().CStr()}="";
 game.cpp:621:FantasyName:{rfsName.CStr()}="";{ivanconfig::GetFantasyNamePattern().CStr()}="!ss !sV";
 game.cpp:625:FantasyName:{rfsName.CStr()}="Rakdra Deno";
 game.cpp:636:Init:{PlayerName.CStr()}="Rakdra Deno";

@ryfactor
Copy link
Member

[windows] I compiled namegen.exe and ran ./namegen "!ss !sV" 5 from PowerShell, which gave me the following output

>combinations = 33459250





>

So I guess the five carriage returns are where the strings are supposed to be? It must be a difference in the way the namegen strings are typed/stored on UNIX vs windows???

Sorry, I couldn't get the debug tool working :(

@AquariusPower
Copy link
Contributor Author

AquariusPower commented May 30, 2018

:o
here how it looks like on linux:

> combinations = 33459250
Therat Rilie
Estir Rodia
Enthet Hine
Kalorm Asou
Nalight Asy
Therlye Irou
Onkim Oldea
Alewor Tanai
Hintin Ormay
Lyetor Garie

it is failing for windows for some reason then :/
I will take a look on it

@AquariusPower
Copy link
Contributor Author

AquariusPower commented May 30, 2018

the readme says "It requires C++11."

my compilers (g++ c++ cpp gcc ..) are version 5.4.0

this code

  if( __cplusplus == 201103L ) std::cout << "C++11\n" ;
  else if( __cplusplus == 199711L ) std::cout << "C++98\n" ;
  else std::cout << "pre-standard C++\n" ;

outputs C++98 (so despite it requires C++11 it works with an older version?)

I just needed to add this param on my test, from the very makefile... -std=c++11

@AquariusPower
Copy link
Contributor Author

skeeto/fantasyname#10

@AquariusPower
Copy link
Contributor Author

the fix @skeeto provided (thx!) still works on linux,
@fejoa could u confirm for windows?

@ryfactor
Copy link
Member

It works! Thanks @AquariusPower and @skeeto !

For later:

  • Love to be able to bring some of these lines into the datafiles, so users can customise without compiling?
  • Perhaps strings/names in the namespace can be attributed to characters in char.dat, so that bears can have bear-sounding names, goblins goblin-sounding names etc?
  • Make names discoverable by sci-talking, charming creatures with above certain int... etc?
  • Use willpower checks to allow changing pet names?

@ryfactor ryfactor merged commit 2eebbb3 into Attnam:master May 31, 2018
@AquariusPower
Copy link
Contributor Author

AquariusPower commented May 31, 2018

animal friend skill: discovering the real animal name and calling it could be another way to taming!

makes me think about: may be one or two powers/perks/traits could be randomized when the player is created, and we could use them like we use the scrolls and wands, once an in-game day, a non cumulative applyable ethereal rune would spawn in our inventory for that to work using current game mechanics. (mmm.. this feels like a issue text..)

so, you mean like using the namegenerator pattern in char.dat? we just need a token like start the name with '#' and it would use the generator instead of fixed name (just need be sure the generator ignores such token to make it clearer).

and if changing the pet name when we are confuse, the name gets randomly scrambled :>

AquariusPower added a commit to AquariusPower/ivan that referenced this pull request May 31, 2018
(ready) Fantasy name generator (Attnam#363)
@AquariusPower AquariusPower deleted the FantasyNameGenerator branch May 31, 2018 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants