Bay 12 Games Forum

Please login or register.

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

Author Topic: [LCS]Modding questions(CIA Raids without heat), compiling latest nightly  (Read 6361 times)

Taberone

  • Bay Watcher
    • View Profile
Re: [LCS]Modifying game messages + Compiling LCS Nightly?
« Reply #45 on: September 06, 2015, 04:02:34 pm »

Congratulation, you just found a bug.

According to the source code, both fullscreen and halfscreen shops support multiple pages. The half screen shop, you are seeing,  has code to display multiple pages, and code for buying from them, but there is no code, to change the page.

The fullscreen shop however has code for turning the pages with arrow keys. In older versions, gangmembers and mercenaries used the fullscreen shop, so what you are doing, would work there.

If you can compile it, it should also be possible to mod it in yourself. The function is void Shop::browse_halfscreen(squadst& customers, int& buyer) const in SHOP.CPP


This is the code for parsing a keypress :
Code: [Select]
     if(c=='e' && customers.squad[0]->base!=-1)
         equip(location[customers.squad[0]->base]->loot,-1);
      else if(c=='s'&&allow_selling_&&len(location[customers.squad[0]->base]->loot))
         sell_loot(customers);
      else if(c=='m'&&sell_masks_&&ledger.get_funds()>=15)
         maskselect(*customers.squad[buyer]);
      else if(c=='b') choose_buyer(customers,buyer);
      else if(c=='0') party_status=-1;
      else if(c>='1'&&c<='6')
      {
         if(customers.squad[c-'1']!=NULL)
         {
            if(party_status==c-'1')
               fullstatus(party_status);
            else party_status=c-'1';
         }
      }
      else if(c=='x'||c==ENTER||c==ESC||c==SPACEBAR) break;


This should work :
Code: [Select]
      if(c=='e' && customers.squad[0]->base!=-1)
         equip(location[customers.squad[0]->base]->loot,-1);
      else if(c=='s'&&allow_selling_&&len(location[customers.squad[0]->base]->loot))
         sell_loot(customers);
      else if(c=='m'&&sell_masks_&&ledger.get_funds()>=15)
         maskselect(*customers.squad[buyer]);
      else if(c=='b') choose_buyer(customers,buyer);
      else if(c=='0') party_status=-1;
      else if(c>='1'&&c<='6')
      {
         if(customers.squad[c-'1']!=NULL)
         {
            if(party_status==c-'1')
               fullstatus(party_status);
            else party_status=c-'1';
         }
      }
      else if(c=='x'||c==ENTER||c==ESC||c==SPACEBAR) break;
      //PAGE UP
      else if((c==interface_pgup||c==KEY_UP||c==KEY_LEFT)&&page>0) page--;
      //PAGE DOWN
      else if((c==interface_pgdn||c==KEY_DOWN||c==KEY_RIGHT)&&(page+1)*19<len(available_options)) page++;
I copied the lines from the fullscreen shop, and replaced the 'if' with 'else if'. It compiles, but I can't try it out so far, as it needs many items to work.

I didn't compile the R855 version of LCS though, the guy who made the R855 version handily provided a .zip with the R855 version already compiled and ready to play. I just dug around in the XML files.

EDIT: For some reason, I keep crashing in the White House. Secret Service Agents are using a wide variety of weapons now, though. Including the three new weapons (P90, FN 5.7, SniperRifle)
« Last Edit: September 07, 2015, 01:05:33 am by Taberone »
Logged

Taberone

  • Bay Watcher
    • View Profile
Re: [LCS]Modding questions, compiling latest nightly
« Reply #46 on: October 02, 2015, 08:21:06 pm »

Got a modding question for regular LCS(Not a question about compiling the nightly). How do I make certain factions(The CIA, for example) raid without heat, and how do I make Firemen actually raid me(they never seem to actually raid me even when I'm publishing documents on LCS R855)?
Logged
Pages: 1 2 3 [4]