Author Topic: How to make single PC game the right way?  (Read 718 times)

Offline Adam

  • Full Member
  • ***
  • Posts: 110
How to make single PC game the right way?
« on: October 30, 2015, 06:34:37 PM »
My current design in work was planned to be single player with a bunch of optional NPCs, but I'm having two significant problems hindering me to do it right.

1) NPC control. I've read http://ua.reonis.com/index.php?topic=1014.msg36938#msg36938, but I'm still puzzled. Does this mean that NPC control is hard coded to one preset class? I would rather not restrict the PC to one class but would like the player to have control over the NPCs (otherwise it kills the whole point of the tactical battle). Is it possible to unlock NPC control generally (or for all the classes)?

2) The player seems to lose the game if all the PCs are out of action, although there may be some NPCs still alive. This means in a single PC game the player has to keep the PC alive. Is there any way to amend this issue?

Offline Null Null

  • Maker of excessively difficult vanilla mods
  • Hero Member
  • *****
  • Posts: 544
Re: How to make single PC game the right way?
« Reply #1 on: October 30, 2015, 10:06:26 PM »
I made one myself, and wound up changing NPC control to mage. (This was Library of Segrob, in case you're curious.) In response to your question, there doesn't seem to be a way (knowing what we know now) to not restrict it to a class, and yes, you have to keep your PC alive.

If any of the hackers want to play with this, we could try to find the class variable and the test (probably 'equal to') near the leader class bytes, then make those available for change. Even if we can't find the class variable, if we change the test to 'greater than or equal to' we can just set the class to 0 and then all classes will be able to control NPCs.

Offline ProphetSword

  • Mod Designer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2849
  • FRUA Lives!
    • Lands of Adventure
Re: How to make single PC game the right way?
« Reply #2 on: October 31, 2015, 08:02:02 AM »
If you want to have the player control the party, why not let them create the party? As a player, if I am playing a single character, I'm okay if the other characters act independently... that way the stakes are on me controlling one character and to keep them alive. If I am controlling a party, they should be characters I create or I might just put them in Quick mode anyway.
LANDS OF ADVENTURE: An Old-School Style CRPG

More Information Here: http://landsadventure.blogspot.com/

Offline Adam

  • Full Member
  • ***
  • Posts: 110
Re: How to make single PC game the right way?
« Reply #3 on: October 31, 2015, 03:59:07 PM »
I made one myself, and wound up changing NPC control to mage. (This was Library of Segrob, in case you're curious.) In response to your question, there doesn't seem to be a way (knowing what we know now) to not restrict it to a class, and yes, you have to keep your PC alive.
Yeah, I found yours while browsing the forum for an answer.

If any of the hackers want to play with this, we could try to find the class variable and the test (probably 'equal to') near the leader class bytes, then make those available for change. Even if we can't find the class variable, if we change the test to 'greater than or equal to' we can just set the class to 0 and then all classes will be able to control NPCs.
It's been a while since I've seen some assembly code, but what you mention seems not that complicated (finding the reference to 0x255c7). I'll see if I can do it myself. Thanks!

If you want to have the player control the party, why not let them create the party? As a player, if I am playing a single character, I'm okay if the other characters act independently... that way the stakes are on me controlling one character and to keep them alive. If I am controlling a party, they should be characters I create or I might just put them in Quick mode anyway.
Allowing NPCs to act on their own is not a problem until you are restricted to one PC. If this one is a fighter, then the tactical combat is not really a tactical one anymore. But you made me think about dropping the one PC concept.

Offline Adam

  • Full Member
  • ***
  • Posts: 110
Re: How to make single PC game the right way?
« Reply #4 on: November 19, 2015, 05:08:01 PM »
Point 1 is solved, it turned out to be more easy than expected: I played around a while with the jumps and managed to let everyone but a specific class to be npc leader, and while trying to find a good exluded class value I found that if I write FF as class it will encompass all the classes. So I changed back the original jumps and tried that one, and voila, it worked!

So if you want to let all the classes control npcs, just use the following diff.tlb additions (first three to allow all the classes to control npcs, last two to let every npcs be controllable):

0x255C7 03 FF
0x256BC 03 FF
0x25910 03 FF
0x25625 01 00
0x25622 64 00

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2091
    • Nol Drek's Web Site
Re: How to make single PC game the right way?
« Reply #5 on: November 20, 2015, 12:19:30 AM »
So if you want to let all the classes control npcs, just use the following diff.tlb additions (first three to allow all the classes to control npcs, last two to let every npcs be controllable):

0x255C7 03 FF
0x256BC 03 FF
0x25910 03 FF
0x25625 01 00
0x25622 64 00

That's a nice addition to the knowledge base. Very useful!
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

 

anything