Forum Replies Created
-
AuthorPosts
-
unfy
Moderatorgreen fits the other game graphics for him, iirc. also, in many of the games, green is typically 'shu', blue is 'wei', and red/orange is 'wu'… ?
unfy
Moderatorrpn: nope, not gonna try to support "normal math" notation. it'll be rpn :P
it'll be a while before i have an update for this… will be working on actually making it a proper state engine / game / etc. while in general it's simple, it's tedious and *can* get complicated (or rather needs to be exacting).
this will mean:
* a proper state loop with states.
* deciding how to handle gui style objects
* deciding on provincial screen gui
* deciding on general selection gui
* getting the "game state" stuff implemented
* eventually getting to battle screen gui etc
I'll undoubtedly be able to update as each stage progresses, but this is a big chunk to bite off all at once and won't really be feedback friendly. The good news is, once this is done, I can begin implementing actual game logic (ie: it becomes interactive!!)… which would allow for other people to grab it and start submitting patches etc if they felt so inclined.
Somewhere in all of this, the conditional stuff needs to be implemented. That'll require some pondering on my part. Conditional stuff examples would be historical events (yuan shu / sun ce example), generic officer promotion after battle, random treasure after combat, etc.
I'm unsure if randomish based stuff would be conditional or if they'd be math based. IE: if you want to try to recruit an enemy general, does it follow a formula and if the result is greater than some number… it succeeds… or is there a conditional tree it'll follow (which could possibly have some math in it as well) ?
I'll probably try to get the GUI to be somewhat txt/ini based so that it becomes more mod friendly easily. An example would be 'search' — having parameters to the search function call so that it could span more than one province or whatever.
unfy
Moderatorhehehehe. the rpn stuff is only much easier to code / process in code…. and is about the only reason it exists heh.
hell, i might be able to write a tool to convert regular stuff to rpn. which begs why not just allow both. whatever.
butttt – i don't mind doing the conversion by hand for other people's suggestions etc :)
unfy
Moderatoryay for colors!
unfy
Moderatoritems to go beyond 100 — we'll see.
RPN – 'reverse polish notation'. its kind of like how Yoda would speak.
you give two numbers, and then an operator. the operator causes an immediate evaluation.
or maybe, 'noun noun verb' if you prefer yoda.
sooooo…
instead of: 2 + 5
you get: 2 5 +
instead of: 9 / 3
you get: 9 3 /
Now, lets say you wanna do more than one mathematical operation. Well, RPN is "left to right" in its entirety… there is no 'order of operations' (unless you consider left to right as being one).
You would do your first operation as above, and then append another number and operator.
Lets start with normal math of: 5 + 3 – 6
RPN for the first calculation would be: 5 3 +
now we want to subtract 6 from this, so we would append: 6 –
Which gives us a final answer of: 5 3 + 6 –
Given that there's no order of operations… if you have:
6 + 3 * 8
In normal math you'd end up with 6 + ( 3 * 8 ) = 30.
If you just translated 6 + 3 * 8 into direct rpn without considering order of operations, you would get:
6 3 + 8 *
Which would evaluate as (6 + 3) * 8 = 72.
Soooooooo…. i've added parenthesis support to the RPN so that you can more or less write it so it forces certain operations to happen first.
Now, you could just rewrite the above as: 3 8 * 6 +
But with the parenthesis, you could keep the numbers in the same order:
6 (3 8 *) +
While this is kinda trivial as described, being able to nest parenthesis or similar is kinda handy (and yes, it somewhat defeats the purpose of RPN).
Also note that this isn't completely true original RPN in that the original RPN would be all operands to begin with, followed by all of the operators. Yeah well, fuck that heh.
The idea behind mine is that everything is "number number operator". Or perhaps "term term operator".
Finally, the example i gave above:
1 9 + ( 2 ( 3 2 * ) + ) *
Written in normal math using lots of parenthesis to avoid order of operations, it would have been:
(1 + 9) * (2 + (3 * 2))
As such…. when coming up with formulas, i'd suggest liberal use of parenthesis to avoid order of operations questions, and then work on translating that to the RPN.
When converting to the RPN, start with the inner most parenthesis and work your way out.
Start:
(1 + 9) * (2 + (3 * 2))
Inner most is the 3*2, so convert that to the rpn:
(1 + 9) * (2 + (3 2 *))
Keeping parenthesis where they are move out. Treat the "(3 2 *)" as an entire "term":
(1 + 9) * (2 (3 2 *) +)
With the right set of parenthesis finished, we convert the left hand (1 + 9):
(1 9 +) * (2 (3 2 *) +)
Lastly, we got that multiply between the two parenthesis to take care of.
(1 9 +) (2 (3 2 *) +) *
This doesn't quite match my example above (its got extra parenthesis around 1 9 +), but it'll function the same.
unfy
ModeratorRPN processor appears to be working:
"1 9 + ( 2 ( 3 2 * ) + ) *"
correctly calculates to "80"
time to ponder what's next.
unfy
ModeratorAnd a fun one to debate if it's applicable or not:
the fog of war! (assumedly based on int)
unfy
ModeratorI was thinking about the 1-100 thing (outside of that general you can bug heh) … and pondering useful items per general (ie: rotk3 or 4 introduced special weapons to get you over 100?) … but… I think i prefer 1-100.
With having more generals (the 450 or so named and then the auto-promote that was discussed earlier), I don't think there will be a need to go over 100 for anything.
Map sizes being more dynamic: I dunno. I gave some thought to that a bit a while back. Was thinking about say, rotk1 vs rotk2 vs rotk3 etc… and how 2 is the only one that shows everything all at once and that scrolling across the map was a tad annoying. Granted, we could just zoom the map out….
Larger map sizes also beg the question of 'how long does it take to trek from starting point to castle ?'. Again, I dunno.
After things get interactive we can tackle that.
unfy
ModeratorAfter the RPN, i really do think it'll need to be some UI work and other stuff to start making the game functional and more wholly interactive so it's easier to start figuring out 'whats next' as well as getting other people involved in the dev process (being that the game is going to be completely free).
This way it'll also move me away from just screen testing stuffs etc….
unfy
ModeratorEditors have to be easy to use. After all, it's what *I* use.
Feature complete, hell no, but bare functionality definitely.
I can easily offer auto-generated spots, and also let the person hand place some… perhaps this way it'd be less work for people to edit their own maps.
Lastly — 'attacker gets fives pots' … lies! attacker gets 2350235098 spots. No limits damnit! :)
I've seen some of the loyalty numbers mentioned in faq's for the other games, but haven't really dug into it much.
While I was debating a lot of stuff, I decided that for all numbers, I was going to stick to the '100' thing that ROTK2 has in prevalence.
unfy
ModeratorAs far as limits of ROTK2, yeah I'm well versed in them as well. I had a post on SoSZ relating to having finished beating the game as Sun Jian on the highest difficulty. Near the end of the game I had only one easy province left (iirc), and Sun Jian was going to die the next month, so I fiddled with ruler replacements.
If I chose a wei/wu/shu leaning general, then the typical historical ties relating to loyalty would surface. Those who were fervent supporters of the respected tie would love the new ruler, others would hate or disilke him. Tried different levels of charm for the new ruler choice and it didn't appear to affect anything. Even went as far as choosing 'that wonderful ball of charisma' that is Cao Bao… and people seemed indifferent. Cao Bao unifying China, there's a thought….
When I went and chose someone more neutral such as Dong Min… every seemed to have fairly decent loyalty… as opposed to some die hard fans and would be assassins. So, in ROTK2, general alignment is what affects loyalty.
I also did some fiddling with the RNG. I did a save state before attempting something… and the RNG seems to tumble on user input or certain screen entering or something. I don't recall if I was searching or recruiting… but I found that if I went into a given menu and came back out of it, that it'd fail. Yet if I went straight into my desired action, it'd be fine. I did a little bit more digging on this but I don't recall the details (i do know that it's not time / music based though).
And yes, the remake will make use of a properly constantly tumbled RNG… no manipulation hehehe.
After the RPN is finished to the point of usable, i'll just have to break down and do actual UI work again :(. I've been avoiding it cause attempting to do that on the netbook while laying down aint fun. Similarly, attempting to fill in more data entry stuff for generals (date of birth, etc) is also a pita while laying down.
I could prolly go about setting up some more tile editing stuff for combat — army placement markers for all the territories etc (ie: when invading province 1 from province 2, where can you place your dudes ? where can defenders place their dudes ? etc).
Or maybe just do some kind of algorithmic thing for simplicity. (within 2 spaces of the castle, within 1 space from forts, etc for defenders…. Attackers get … within 4 spaces from a fixed point (requiring editor). I dunno.
RPN first then figure out what's next.
unfy
Moderatorpsuedo code is just fine in my book … and for the AI that'd be overly welcome… AI is something I wasn't really looking forward to heh.
Edit:
I actually tend to do a pseudo code skeleton, then actually flesh it out btw :P
unfy
Moderatornot quite what i was looking for at the moment, was referring more to rpn stuff heh.
but are all definitely note worthy wishlist additions.
so far, most everything i've done has involved writing tools to also generate the stuff as needed (ie: the pixel perfect click map, provincial battle map, etc).
removing limits: yeah, one of the original goals.
AI stuff: well, need a basic AI to work from to begin with… so that's all a fairly long way off.
making events such as the yuan shu you describe be easily modable would be rough, but something like LUA would have made that pretty simple i think (in which case, most of the game would be LUA with just graphical stuff). lua stuff for the language i'm working in doesn't sound like it's rock solid… so i'm a bit weary of using it.
i suppose a series of conditions and possible results could be figured out for text file parsing…
historical events such as the one you've proposed were near the bottom of the todo list heh.
unfy
Moderatorrpn calculator starting to take shape. yeah, rpn's are easy, but it's the first time i've done it in this particular language :P
so far, since it's an rpn instead of lua… it has the natural limitations normal straight math would have.
rpn based
* operand operand operator
* ie: "5 2 +" instead of "5 + 2"
Left to right order of operations (limitation of rpn)
* ie: "5 2 + 4 *" = (5 + 2) * 4 = 28
Operators
* "+" = add
* "-" = subtract
* "*" = multiply
* "/" = divide
* "%" = modulo
* "^" = raise to a power
* "@" = take an n-th root
** will slightly error due to using pow(base, 1/n)
** ie: 8 3 @ = possibly 1.99999…
Parenthesis support
* solves inner most parenthesis first, working its way outward
** ie: "5 (4 3 *) +" = 5 + (4 * 3) = 17
** ie: "5 (4 (2 1 +) *) +" = 5 + (4 * (3)) = 17
Phrase substitution
* replace words with values from game logic
** ie: totalgenerals, totalgold, avggold, mingold, maxint, avgint, minint, etc
The phrase substitution will naturally be in flux for a long time. More operators can be added naturally….
So ya might have math.ini that has something like:
FloodControlImprove=totalgold totalint * avgint / totalgenerals / 3 /
For a simple "total improvement = ((total money * total intelligence) / average intelligence) / total generals doing it / 3"
I'll post more tomorrow about phrase substitutions i'll offer and solicit ideas.
unfy
Moderatorultima exodus (nes): conquered! FLEXX
so…. i've started fiddling with this again, even if while trying to type / track pad while laying in bed….
yay!
-
AuthorPosts