Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - The Cheshire Cat

Pages: 1 2 [3] 4 5 ... 7
31
Curses / Re: An LCS Remake
« on: November 21, 2018, 08:04:41 pm »
In the Unity "Assets" menu there should be an "Open C# project" option at the bottom which will open visual studio with a connection to the Unity editor, which will allow it to read and compile the scripts properly.

32
Curses / Re: An LCS Remake
« on: November 21, 2018, 03:59:43 pm »
Are you opening it through Unity and the "Open C# project" menu option in that, or just directly in visual studio? The thing about Unity projects is that they aren't actually standard C# code and you can't just compile them with VS.

The hierarchy I was talking about isn't the scripts, but the scene hierarchy in the Unity editor:


33
Curses / Re: An LCS Remake
« on: November 12, 2018, 05:26:07 pm »
Yeah currently there's no way to dismiss a Liberal other that suicide by cop - I will probably add it at some point along with manual promotion.

The recruitment option is a bit trickier because I'd probably have to set up a whole custom interface for it that's more complex than other activities (I seem to recall even the original game could get buggy when you used it). I'd originally planned to include it but it was one of those things where the amount of effort involved vs. the actual value it added to the game kind of made it into a low priority thing.

34
Curses / Re: An LCS Remake
« on: November 04, 2018, 11:23:19 pm »
So I decided to take a crack at multi-city support this weekend and I sort of have it in, although I have probably broken a dozen other things by doing so. NationDefs.xml can now be modified to add extra cities to the game and if there is more than one city defined, a "TRAVEL" button will appear in the "Go forth to stop evil!" menu. Travel between cities costs $200 per person and if you travel as a squad it will send you to the Homeless shelter in the target city (you can also reassign liberals without a squad to other cities in the Liberal detail screen. It still costs $200). If you can't afford to travel it will just cancel the action when you wait until the next day.

35
Curses / Re: An LCS Remake
« on: November 02, 2018, 06:16:38 pm »
Doing multi-city actually wouldn't be a HUGE extension of the existing code - as far as the game is concerned a location is just a thing independent of any organizational structure and how they're arranged is more for the convenience of the player than a hard requirement. You'd basically just need to add another layer to the hierarchy where you have a "Country" entity that holds a list of "City" entities and then up date the UI to reflect that. The biggest change would probably just be in the logic that loads the city definition from the xml files. Some logical changes would probably be needed in a few methods like when someone gets arrested or sent to the hospital - right now those assume that only one of the relevant location exists (they would technically still work in that they would send them to a location of that type - but it might not be the local one). I'll look into adding support for this but I've been taking a bit of a break from anything too major on this so I don't want to make any promises.

For the class you've mentioned, any class that extends MonoBehaviour is a Unity object and works through the Unity editor's interface rather than the code itself. For that specific example, it's a script used on a prefab (called "LawAlignment", stored in the Assets/Prefabs/Base Screen folder). None of those variables are set in code and it isn't created through a constructor the same way you'd be used to - rather in the Unity editor all of those fields are set in the hierarchy or on the prefab definition (a prefab is basically just a specific saved copy of a hierarchy object that you can freely duplicate either in the editor or at runtime), and it gets instantiated by setting a reference to the prefab on another object (In this case, it's an object in the hierarchy itself, under Main Camera -> Canvas -> Base Screen -> Liberal Agenda, and the LiberalAgendaImpl script on that object), and then calling Instantiate in the code with that reference as input.

For this kind of stuff you're probably going to want to familiarize yourself with how Unity structures things in general, since that's where all the UI logic lives. Unity does things in a way that's slightly different than how you'd expect to handle them in code, and basically requires using the editor interface to do a lot of stuff. To give an example of how you'd do the thing you asked, what you could do is copy the Liberal Agenda object from under the Base Screen object in the hierarchy and paste it as a child of the Site Screen object. In this copy you'd want to remove any of the UI elements that you won't want accessible on the Base Screen (Like maybe the poll or map buttons), and rearrange anything that doesn't fit in nicely with the Site interface. Since this is all just layout on a copy, there's no code changes needed and nothing will be affected on the original agenda screen. Once you've got the UI arranged how you want in the hierarchy, you'd just need to modify the SiteScreenController to give it a "public LiberalAgendaImpl LiberalAgendaView;" variable to set in the editor with a reference to the screen you just added, then add a method that will call the "show()" method of that object and hide any elements you don't want displayed while it's there, and then add a button on the Site Screen UI that will call that method.

36
Curses / Re: An LCS Remake
« on: November 01, 2018, 11:32:55 pm »
Addendum: I have found a couple of bugs.

1. conservatives can go straight from looking at you suspiciously to an alarm cry in the same turn, if the conservative panic happens in the same turn.

I've seen this happen but I think it might be more of a display issue than an actual internal issue - what happens is that the conservative panic triggers on the step you take just before the encounter, but you don't get the popup warning about it until the next time the game is prompted to check, which is after you take your next action (which, if it includes a failed disguise check, since the enemy is already suspicious will cause them to sound the alarm, which will queue up an "alarm" popup behind the already queued "suspicious" popup, so you get both at once).

I haven't quite found a way to rearrange the order here that doesn't break something else so it's something I still need to fiddle with.

Quote
2. It's possible to fade into the shadows while being naked.

This isn't really a bug so much as it is a consequence of nakedness prompting a disguise check even in unrestricted areas before you've committed any crimes (normally no check is made here at all). Basically you HAVE to make a stealth check or else everybody notices that you're naked and panics (except in the sweatshop where nudity is considered a valid disguise).

Not found sound effects yet, but haven't had my earbuds plugged in.

Also, bug #3. you can train skills up at speeds greater than one rank/day.

This also isn't a bug so much as I just never bothered to implement the daily training cap since I didn't really see the need for it as a mechanic. It doesn't really do anything to discourage skill grinding - it just forces you to tediously split up your grinding sessions across multiple in-game days.

Also yeah, there's no sound effects or music in the game. I don't think implementing them would actually be particularly complicated and I already sort of have a framework in place where code can send events to the UI when it's called (I use this approach for dialogue bubbles), so a similar approach could be used to play sound effects for actions.

37
Curses / Re: An LCS Remake
« on: October 28, 2018, 02:32:55 pm »
Press F1.

38
Curses / Re: An LCS Remake
« on: October 22, 2018, 08:18:55 pm »
They are implemented, but won't show up until public opinion shifts about 60% liberal.

39
Curses / Re: An LCS Remake
« on: October 13, 2018, 01:11:23 pm »
As someone who is just starting out learning Unity (I'm past the "Hello World" stage and into the top-down-shooter-controls-and-camera nightmare that traditionally comes next :P), I am so incredibly grateful to you for sharing it as a Unity project.  Just being able to look at a feature-complete game that I'm relatively familiar with (I've played many previous iterations of the LCS codebase) is going to be hugely helpful in getting my head around some of the ways-you-can-use-Unity concepts.

So, thank you.  And that's without even having played it yet.  ;)  Downloading now!

I should probably warn you up front that this isn't a GREAT use of Unity. I ended up fighting it a lot and in retrospect I think it would have worked better had I made more use of the Unity interface rather than trying to handle everything in code. I guess it does serve as a demonstration of how you can do that (some Unity games are set up like this - as I understand it the Roguelike Caves of Qud is also designed this way), but it's not what I would recommend as an approach if you're planning to really get in to Unity.

40
Curses / Re: An LCS Remake
« on: October 11, 2018, 09:03:43 pm »
I've uploaded a build with some fixes for these issues - see if the changes I've made resolved the portrait issues (I had some other people test the game on their Linux machines and they didn't get the same issue you did, so it might be a hardware thing. The changes I made should "simpler" for different GPUs to handle since I don't do anything with rendering to textures anymore).

If you want to fix the save that you had that'd stopped working, you can open it up in a text editor and find the line that says "<ceo>45446</ceo>" and replace it with "<ceo>null</ceo>". It should load fine after that and it'll just generate a new CEO the next time you activate the special tile.

41
Curses / Re: An LCS Remake
« on: October 10, 2018, 04:26:46 pm »
Hmm, the save and log file for the portrait issue look fine so I can't really tell what the problem is there. It may be some Linux specific thing. I'll look into some of the details on the methods I'm using to generate portraits to see if there are any system specific aspects to them that might be cause the problem.

The save corruption looks like it's due to the CEO entity not having saved correctly - there's a hanging reference to them in the Government entity but no matching entity to be referenced. Do you remember specifically what you'd done just before you quit out that might have caused that to happen? The CEO handling is a bit hacky so it's very likely there's some edge case that I've missed.

*edit* yeah looks like there's a LOT of edge cases I've missed. I'm looking at how persistent non-liberal entities are being handled and there are a ton of holes where they could be created in-game and registered to persistent handlers, but not persisted themselves, so the save game would be left with the same kinds of references to entities that don't exist as far as the game is concerned. It looks like the CEO is especially bad about this, because it is created as soon as you activate the special tile in the CEO house, but it's not actually saved unless you recruit them.

42
Curses / Re: An LCS Remake
« on: October 07, 2018, 02:23:33 pm »
Great project. I've come about two or three problems though playing the Linux build:
* Faces aren't generated, the only Portraits I've come across are the ones made of one part e.g. Monsters and Guard Dogs. The other ones are just grey boxes.
* When I try to cheat by exiting the game before going to the main screen after a failed escape or something similar, I sometimes can't load the savestate anymore (where is it stored btw.?), I'll just get a black screen with the games frame, which is somewhat frustrating.
* I don't see a way to promote seduced members, although I don't exactly remember if this was possible in older versions of LCS. It is very useful though and I'd like to have this feature.

Hmm, I'm not really sure why faces wouldn't be working in the Linux build - there may be some weirdness with how they're rendered that Linux specifically doesn't like. I wouldn't think it would work differently on Windows and Linux since it's all built in Unity functionality (which should be OS agnostic) but I am using it in kind of an awkward way. I don't really have a way to test Linux builds though so the only way this will really get addressed is if someone with a Linux machine can take a look at it and see what's going on.

Likewise, the blank screen is probably due to an issue with the save being corrupted. This doesn't happen on a "cheat" exit on Windows (I specifically set it up so it wouldn't be an issue - if people want to savescum I'm fine with that), but Linux may handle things differently than windows when a program is force-terminated. It might also have to do with WHEN you're quitting exactly - I made some changes to the autosave behaviour in the last build and there may be some issues if you quit out at particular times that I hadn't seen when I was testing it.

As for where it's saved - $XDG_CONFIG_HOME/unity3d/Lazy Dog Software/LCS (XDG_CONFIG_HOME defaults to ~/.config). This folder will also have a log file that can contain exception information that might be helpful to diagnose what's happening - can you trigger the black screen on a failed load, and then upload the Save.sav and output_log.txt from that folder somewhere so I can check them? Actually, the output_log.txt might also have some helpful information on the blank portrait issue too (if it's being caused by an exception), so a copy of one from after you see that happen would be helpful too. Bear in mind that Unity will overwrite this file every time you start the game up so you'd need to make copies of this file for each issue separately (i.e. enter the game, try to load the bad save file, get the black screen, quit, copy/rename the output_log.txt to somewhere else, enter the game again, start a new game and go until you see a grey box portrait, quit, then copy/rename the output_log.txt file again).

Right now you can't promote anyone manually - promotion will happen automatically if someone's current leader dies as long as THEIR leader has space to lead their new subordinates. If the person being promoted was seduced, they will only promote if they have more than 100 Juice (they will promote as a regular member though, so they still take up a recruitment slot on their new leader even though they didn't on their previous one). Otherwise, they aren't committed enough to the cause to want to continue after their lover is killed and they will just leave the LCS. This is all directly from the code I was referencing so if there was a version that used to allow you to manually promote seduced liberals, it was older than the one I based my code on. I may add manual promotion back in at some point but it would probably still not be allowed for seduced members unless they meet that 100 juice requirement.

43
Curses / Re: An LCS Remake
« on: October 01, 2018, 07:55:15 pm »
Well, for the most part yes, but bear in mind that I'm not really a better programmer than anyone else who worked on the original and a lot of this was learning as I went, so it's not really "well designed" even if it is more OO than the original. Like, you won't really deal with as much "spending 10 minutes to try to figure out where this variable is actually set/used" as you would in the old LCS code, but I haven't really broken up my classes as much as they could be and there's a lot of weird stuff I do that I don't think is very good C# practice.
And don't get me started on the while(true) loops, the nested for loops within switch statements, and the 2000 line method.

It's amazing you've managed to port it to Unity at all, let alone creating a new GUI.

Well bear in mind it's not a straight "port", it's a remake. I used the source code as a reference for how various mechanics were implemented so that the rolls and such being done would match up, but it's not a straight up "put everything from the original game into Unity" copy. So when it came down to something really confusing rather than just copying it over directly I tended to try to just determine the intention behind what was being done, and implemented it in a way that was simpler to me. Like the actual flow of say, a round of combat is basically the same as the original game, but the way it's being handled is different.

44
Curses / Re: An LCS Remake
« on: September 25, 2018, 02:41:52 am »
Uploaded an OSX build to the itch page. Same disclaimer on this as with the Linux build - I can generate it but I don't have any way of testing it, so I have no way of knowing if it doesn't work unless someone tells me.

45
Curses / Re: An LCS Remake
« on: September 20, 2018, 10:46:57 pm »
How easy is this to mod? Is it similar to normal LCS, easier, harder?
If it is really different, can you post a modding guide?

Depends what you're trying to mod. You can add new items, creatures, locations etc. just by editing xml files. The directions for these are inside the files themselves. Adding new functionality is a bit trickier since you need to import the project into Unity to build it, and the general design of the code is much different than the original game so you'd need to kind of re-learn how things are put together. At some point I am planning to post an explanation of how the code is structured but it'll probably take a while to write up.

One thing we can be sure is that object-oriented programming will be more proeminent than in the original code, thereby ensuring things will be more easily added or modified.

Well, for the most part yes, but bear in mind that I'm not really a better programmer than anyone else who worked on the original and a lot of this was learning as I went, so it's not really "well designed" even if it is more OO than the original. Like, you won't really deal with as much "spending 10 minutes to try to figure out where this variable is actually set/used" as you would in the old LCS code, but I haven't really broken up my classes as much as they could be and there's a lot of weird stuff I do that I don't think is very good C# practice.

I would like to do a bunch of refactoring to try to improve the usability of the code overall and to break up some of the "superclasses", but it's not as high a priority for me as just generally fixing bugs and making the player experience roughly match the original game.

Pages: 1 2 [3] 4 5 ... 7