Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Pathfinder Pathfinder: Kingmaker - Enhanced Plus Edition - now with turn-based combat

The_Mask

Just like Yves, I chase tales.
Patron
Joined
May 3, 2018
Messages
5,925
Location
The land of ice and snow.
Strap Yourselves In Codex Year of the Donut Steve gets a Kidney but I don't even get a tag. Pathfinder: Wrath I helped put crap in Monomyth
Is there no way to dismiss spells? Grease starts out with a whole minute duration, there's no way I'm going to wait this much/caster level after a fight is over.
I'm not sure how they didn't think of this. ToEE had this 15 years prior.
 

Xamenos

Magister
Patron
Joined
Feb 4, 2020
Messages
1,256
Pathfinder: Wrath
Is there no way to dismiss spells? Grease starts out with a whole minute duration, there's no way I'm going to wait this much/caster level after a fight is over.
I'm not sure how they didn't think of this. ToEE had this 15 years prior.
I am 110% sure they just couldn't implement it in time without their spaghetti code blowing up. It's in Pathfinder rules, the modders didn't come up with the mechanic by themselves.
 

InD_ImaginE

Arcane
Patron
Joined
Aug 23, 2015
Messages
5,937
Pathfinder: Wrath
Well that's the only mod to fix this without adding other stuff

CotW and EA has built-in solution but both added and changed a lot of stuff. In case of EA probably won't work at all with latest game version.

The option added by that particular mod seems to just make the in game clock run faster so that one should work I guess?
 

Waterd

Augur
Joined
Jan 22, 2012
Messages
228
After solasta left me itchy for good tactical rpg, i made the mistake of going back to pathfinder kingmaker. The combat design is so atrocious, it's basically diablo with 6 characters. 90% of fights (maybe more) are just bags of meats going for you, the most lazy design in combat possible.

I kinda regret not backing KOTC2, i want to play it.
 

Trashos

Arcane
Joined
Dec 28, 2015
Messages
3,413
- Arcane Weapon Enhancement buff for Magus now shows on portrait. At last!

- Some previously blocked routes have now been unblocked. For example, there was such a blocked route south of the wolves at Stag Lord's Fort, and another one to the southwest of the Ruined Watchtower location (among the trees).

The unblocking of the latter route is an issue, afaic, and it should have remained blocked. One possible tactic against the worgs and wolves in the south used to be to stand on the higher ground and rain arrows on them. The worgs/wolves would come after you, but they had to go around the trees, so they would never reach you, and you could go on with your archery practice. Now that the tree route has been unblocked, they reach you all right, so said tactic is no longer possible.

Imo, this is bad for the following reasons:
This was one of the very few cases in the game where this tactic was possible. Why make it completely disappear?
You just got Ekun, so that tactic was about him to shine early. Now that's gone.
It is not like you were going to miss fighting worgs and wolves elsewhere.
 

Delterius

Arcane
Joined
Dec 12, 2012
Messages
15,956
Location
Entre a serra e o mar.
so my character's clothes colors are randomly turning to light blue
Do you have the option "class specific clothes" or something like that turned on?
Nope. This is a real bummer tbh, wanted to play kingmaker a bit before moving on. Maybe I should just revert to pre TB patch.
Should this ever happen to anyone else, the bug is super random and hard to reproduce. Just keep reloading until it disappears.
 

LannTheStupid

Товарищ
Patron
Joined
Nov 14, 2016
Messages
3,195
Location
Soviet Union
Pathfinder: Wrath
https://owlcatgames.com/news/58

The Silent Hunt: Searching for Memory Leaks

These days, you don't have to be an IT professional to know the term "memory leak." For gamers, memory leaks are often associated with game lag, or even crashes. But what is a memory leak? What causes them, and how do we deal with them? It’s time for terrible Excel analogies!

Let's imagine that we have an Excel sheet in which each row is one game object, and each cell of that row is some element of this object. A cell can contain something like an HP value, a character's name, or a weapon texture. It can also contain a link to other objects, which in our example would just be the row number.

pasted_image_0.png


Fig. 1: Amiri object (row 1) refers to the Ginormous Sword object (row 5) in cell D1.

At some point, the object may become unnecessary, so we would like to free the memory it occupies by clearing its row. In programming languages without garbage collection, such as C++, this has to be done manually. At some point, someone has to say, "This row is no longer needed." In such languages, memory leaks often occur when the programmer forgets to do this for some reason, and the object continues to occupy that memory area indefinitely. If there are lots of these "forgotten" objects, we will eventually run out of memory. (After all, to use our example, there are only 65,536 rows in an Excel 97 spreadsheet!) The next time the game tries to find a place for another character or object, it will crash.

On the other hand, however, if the object is deleted while it’s still needed elsewhere (there’s a link to it in some other row), then the game may also crash when it tries to get the Ginormous Sword using this link and instead finds . . . an empty space at best, and at worst, a goblin.

pasted_image_0_1.png


Fig. 2: Now Amiri object (row 1) refers to Nok-Nok (row 5), and tries to use him as a weapon. Unfortunately, the computer is a bit more scrupulous than your DM at the table, and won't allow Amiri to do that.

Currently, there are many tools that help to both find and prevent such coding errors within a program being run. To do this, the tool simply has to force the program to tell us when the object was created, and when it was deleted. Then, at any time, we can see if there are unnecessary objects in the memory that shouldn’t be there. If there are such objects, we should deal with them using the traditional Russian questions, “Who is to blame?” and “What is to be done?”

However, for programming languages like C#, in which our game is written, things are both simpler and more complex.

C# has a feature called a "Garbage Collector.” This respected digital gentleman carries a big broom. From time to time he searches our spreadsheet, looking for the rows no longer referred to by a cell, so he can sweep them away. This approach eliminates the two problems previously listed: first, objects that are no longer needed are deleted, not forgotten. Second, no object can be deleted before the last reference to it is gone!

pasted_image_0_2.png


Fig. 3: Amiri (row 1) has thrown that goddamn Ginormous Sword away, and is now using the Flaming Two-Handed Sword +1 (row 7). The Ginormous Sword has been removed from the spreadsheet, and row 5 is ready to take on something else.

However, as old Heinlein used to say, "TANSTAAFL!” Such convenience has a cost: the game is hung up every time the Garbage Collector searches the spreadsheet. If it only takes a couple of milliseconds, that's great, and the player won't even notice. But spreadsheets can become huge in size, making the Garbage Collector’s work very noticeable, and causing some frustration for the player. Therefore, this digital gentleman does not work all the time, but only periodically, such as when the spreadsheet runs out of free rows. (After the Garbage Collector has gone through the spreadsheet, new empty rows will appear so that new objects can be created.)

A keen-minded reader will surely have noticed that no one refers to Amiri in our spreadsheet, and may wonder why the Garbage Collector has not deleted that object. This is what we call a chicken-and-egg problem. There’s an object or objects somewhere that no other object refers to, but which cannot be deleted, otherwise the spreadsheet will become empty! In the systems with garbage collection, such objects are called "roots" - they are marked so that the Garbage Collector does not delete them. For simplicity, we further assume that the root is the first row in our spreadsheet.

Furthermore, although the Garbage Collector eliminates the possibility of these types of memory leaks, other versions of the problem still remain. An example of this is when an object is no longer needed, but is still referred to by some other object.

pasted_image_0_3.png


Fig. 4: Amiri (row 1) no longer refers to the Ginormous Sword, but refers to Quest Number 5 (cell I1), which failed and (for some reason) refers to the Ginormous Sword. We should have deleted this Quest from Amiri's memory, but we forgot.

The Garbage Collectors have different features, and the one in the Mono platform used by Unity has a particularly problematic feature. It does not tell anyone after it deletes an object that is no longer needed, and forcing it to disclose information about this event is impossible. This greatly complicates the search for memory leaks when using this method, because although we know at what moment the object was created, we do not have the slightest idea about when the object was deleted. As a result, we have no way to know which objects are live at any given time.

There are built-in memory analysis tools in Unity that take a different approach. These tools compile and store a list of live objects at a given point in time, and you can simply look through the list to see if anything there is no longer necessary. In addition, it’s often useful to compare these lists at two different points in time, such as before loading a saved game from the menu, and after returning back to the menu from a loaded game. By doing this, we can easily see whether or not the game released all the objects that were clearly not needed in the menu.

Unfortunately, compiling this kind of list takes a long time, especially in Unity 2018. (The process was greatly accelerated in Unity 2019, but the amount of time needed to change the version of Unity for Pathfinder: Kingmaker makes it a nonviable option.) In fact, calling the process “long” is an understatement. In some cases, it can take up to ten hours in Unity 2018, and even in Unity 2019, it can’t be done for every frame.

That’s why we chose to go a different route. We decided to implement a leak detection method somewhat similar to the first one we discussed. To do this, we had to roll up our sleeves and get to work, plunging into the depths of Mono and Unity. As a result, however, we managed to make a tool that can show the game’s memory consumption in real time. (Well, more or less. To be honest, the game slows down A LOT when garbage is collected, but that’s okay because it only happens when our tool is running. Players shouldn’t worry about a slow down.)

For this method to work, there are two things we have to do:

1) Every time a new object is created (a new row in the spreadsheet), we remember the number of that row and the type of object that was created.

2) Every time the garbage is collected, we immediately repeat the virtual cleaning, but with our own code, which goes through all the rows remembered in Step 1, and deletes everything from the list that is no longer referred to by another row.

To put it simply, we do all this extra work just to receive a message that the object (row) has been deleted. However, this additional effort is important, because it’s the only way to get that necessary information.

pasted-image-0-4.png


Fig. 5: The created tool makes the graph of memory consumption visible throughout the entire operation of the game, and any time interval can be explored without the need to compile lists of objects at specific points in time.

This new tool will be used to combat memory leaks in our future games, and we hope that it will make it easier and faster to detect them.

If any of our readers are Unity developers, either professionals or enthusiasts, who might find this kind of tool useful, you are welcome to download its source code and compiled versions for Windows in our new section on Github!

Owlcat Games programmer Max Savenkov
 
Last edited by a moderator:

The_Mask

Just like Yves, I chase tales.
Patron
Joined
May 3, 2018
Messages
5,925
Location
The land of ice and snow.
Strap Yourselves In Codex Year of the Donut Steve gets a Kidney but I don't even get a tag. Pathfinder: Wrath I helped put crap in Monomyth
I know that when you choose angelic aspect and then poli into dragon, you end up a dragon with angel wings, which might as well be the coolest thing I have ever seen in a videogame ever, but I have never tried druid shapeshift from an Asimar.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom