Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4] 5

Author Topic: An LCS Remake  (Read 5823 times)

The Cheshire Cat

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #45 on: October 28, 2018, 02:32:55 pm »

Press F1.
Logged
LCS Graphical Remake:

https://the-cheshire-cat.itch.io/lcs
Current progress: ~100%

SlatersQuest

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #46 on: November 01, 2018, 07:20:36 pm »

I am finally downloading Unity and going to look into the code to start my new total conversion mod. Expect updates in the next couple of weeks with their own thread.  :)


EDIT: nm. seems to be working now!
« Last Edit: November 01, 2018, 07:49:33 pm by SlatersQuest »
Logged

SlatersQuest

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #47 on: November 01, 2018, 08:50:27 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.

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

Taberone

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #48 on: November 01, 2018, 08:50:54 pm »

Are there any sound effects?
Logged

SlatersQuest

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #49 on: November 01, 2018, 08:53:37 pm »

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.
Logged

The Cheshire Cat

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #50 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.
Logged
LCS Graphical Remake:

https://the-cheshire-cat.itch.io/lcs
Current progress: ~100%

SlatersQuest

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #51 on: November 02, 2018, 05:08:09 pm »

I discover to my disappointment that the remake is single-city only, and I want my total conversion to be multi-city. I also am having a difficult time with the code. For example, the code for LawAlignmentDisplay is the following:

Code: [Select]
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using LCS.Engine;

public class LawAlignmentDisplay : MonoBehaviour {

    public MouseOverText mouseoverText;
    public Text t_LawName;
    public Image i_CC;
    public Image i_C;
    public Image i_M;
    public Image i_L;
    public Image i_LL;

    public Sprite smallPip;
    public Sprite largePip;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

}

    public void setLaw(string def, Alignment align)
    {
        t_LawName.text = GameData.getData().lawList[def].name;
        Color alignColor = Color.white;

        switch (align)
        {
            case Alignment.ARCHCONSERVATIVE:
                alignColor = Color.red;
                i_CC.sprite = largePip;
                i_C.sprite = smallPip;
                i_M.sprite = smallPip;
                i_L.sprite = smallPip;
                i_LL.sprite = smallPip;
                break;
            case Alignment.CONSERVATIVE:
                alignColor = Color.magenta;
                i_CC.sprite = smallPip;
                i_C.sprite = largePip;
                i_M.sprite = smallPip;
                i_L.sprite = smallPip;
                i_LL.sprite = smallPip;
                break;
            case Alignment.MODERATE:
                alignColor = Color.yellow;
                i_CC.sprite = smallPip;
                i_C.sprite = smallPip;
                i_M.sprite = largePip;
                i_L.sprite = smallPip;
                i_LL.sprite = smallPip;
                break;
            case Alignment.LIBERAL:
                alignColor = Color.cyan;
                i_CC.sprite = smallPip;
                i_C.sprite = smallPip;
                i_M.sprite = smallPip;
                i_L.sprite = largePip;
                i_LL.sprite = smallPip;
                break;
            case Alignment.ELITE_LIBERAL:
                alignColor = Color.green;
                i_CC.sprite = smallPip;
                i_C.sprite = smallPip;
                i_M.sprite = smallPip;
                i_L.sprite = smallPip;
                i_LL.sprite = largePip;
                break;
        }

        mouseoverText.mouseOverText = GameData.getData().lawList[def].description[align];

        t_LawName.color = alignColor;
        i_CC.color = alignColor;
        i_CC.SetNativeSize();
        i_C.color = alignColor;
        i_C.SetNativeSize();
        i_M.color = alignColor;
        i_M.SetNativeSize();
        i_L.color = alignColor;
        i_L.SetNativeSize();
        i_LL.color = alignColor;
        i_LL.SetNativeSize();
    }
}

I understand what this code does and when in the game this code is used, because I've seen it in action and can figure out what the various parts refer to, but how is this class called? If, for example, I wanted to make it possible to access the liberal agenda screen while in site mode as well as in base mode, how would I go about doing it?
Logged

The Cheshire Cat

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #52 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.
« Last Edit: November 02, 2018, 06:20:56 pm by The Cheshire Cat »
Logged
LCS Graphical Remake:

https://the-cheshire-cat.itch.io/lcs
Current progress: ~100%

The Cheshire Cat

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #53 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.
Logged
LCS Graphical Remake:

https://the-cheshire-cat.itch.io/lcs
Current progress: ~100%

SlatersQuest

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #54 on: November 06, 2018, 12:29:37 pm »

Cool - I am at a scientific conference right now so haven't been able to play it/learn more about Unity and won't be until I get back, but I will get to it soon!
Logged

Kyros

  • Escaped Lunatic
    • View Profile
Re: An LCS Remake
« Reply #55 on: November 12, 2018, 03:28:00 am »

Hey, man good job porting this game to Unity. Wanted to ask you a question, how can I dismiss one of my recruits like in regular LCS ver. by IsaacG? Canít find it, and if itís not in the game maybe you will consider adding it. (Same with recruiting option, which is not in the game right now)
Logged

Taberone

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #56 on: November 12, 2018, 11:17:01 am »

Hey, man good job porting this game to Unity. Wanted to ask you a question, how can I dismiss one of my recruits like in regular LCS ver. by IsaacG? Canít find it, and if itís not in the game maybe you will consider adding it. (Same with recruiting option, which is not in the game right now)

You could always have them commit suicide by carjacking. Let them try to carjack, have them get caught, keep fighting the cops until they die. At least, that's how it works in the other versions of LCS. Haven't tried that myself yet in this remake version.
Logged

The Cheshire Cat

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #57 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.
Logged
LCS Graphical Remake:

https://the-cheshire-cat.itch.io/lcs
Current progress: ~100%

Little

  • Bay Watcher
  • IN SOVIET RUSSIA, LITTLE IS YOU!
    • View Profile
Re: An LCS Remake
« Reply #58 on: November 13, 2018, 06:03:09 pm »

Talking to people and hijacking cards need keyboard shortcuts. I'm sure there's a few other spots as well,

Other than that, fantastic job!
Logged
Blizzard is managed by dark sorcerers, and probably have enough money to bail-out the federal government.

SlatersQuest

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #59 on: November 21, 2018, 12:19:12 pm »

So, I downloaded your latest code and tried to compile it (without changing anything), and got the following error:

Code: [Select]
[home directory]/LCS remake/LCS.CSharp.csproj(11,11): Error MSB4226: The imported project "/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/xbuild/SyntaxTree/UnityVS/2015/UnityVS.CSharp.targets" was not found. Also, tried to find "SyntaxTree/UnityVS/2015/UnityVS.CSharp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "/Library/Frameworks/Mono.framework/External/xbuild/" and "/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/docker/MonoDevelop.Docker/MSbuild" . These search paths are defined in "[home directory]/Library/Caches/VisualStudio/7.0/MSBuild/14822_1/MonoDevelop.MSBuildBuilder.exe.config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths. (MSB4226) (LCS.CSharp)
Can you tell me what this is about?


Addendum: you said that there is a LiberalAgenda object under the BaseScreen object. Where do I find these? I find a script with the name LiberalAgenda, which is located in a folder called BaseScreen, but no hierarchical objects like you describe. Certainly the LiberalAgenda script has no child objects of its own...
« Last Edit: November 21, 2018, 12:28:57 pm by SlatersQuest »
Logged
Pages: 1 2 3 [4] 5