Jump to content
Ducio

Is it possible to modify the news ticker?

6 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Is it possible to modify the news ticker? It would be fun to add news items relevant to the region you're working on, like maybe, announcing the baseball team's championship, local Schrödinger cat stuck in box, or whatever.

  • Yes 1

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Sure it's possible to do, all of these messages are triggered by LUA scripts inside the SimCity_1.dat file. The messages themselves are probably just LText files with the text. The harder part, is re-writing the LUA to trigger your custom messages. But if you just wanted to alter the existing ones, that'd be much easier. All the LText's I believe would be inside the Locale file.

  • Like 3
  • Thanks 1

Head over to my Lot and Mod Shack to keep abreast of my latest developments.

Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

p.s. - I'm MGB over on SC4D and a member of the NAM team.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Obviously and the name and the description is LTEXT based so it's easy to modify. But to add, you need Lua scripts.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
On 1/10/2021 at 6:52 PM, rsc204 said:

Sure it's possible to do, all of these messages are triggered by LUA scripts inside the SimCity_1.dat file. The messages themselves are probably just LText files with the text. The harder part, is re-writing the LUA to trigger your custom messages. But if you just wanted to alter the existing ones, that'd be much easier. All the LText's I believe would be inside the Locale file.

I can confirm that that's where they are in both cases.

Here is where the "fluff" messages are located:

LuaFluff.jpg.34861a0de4145abfe51761a4be3c0442.jpg

Here is the code for one of the messages (they appear to pretty much be the same for the "fluff" type ones):

luafluffentry.jpg.f5179bcb64c611137d488b1e234a7198.jpg

The "a7619f2" is the location of the specific LTEXT file that contains the desired string in the localization .dat

Aside: The 'Stupid News Ticker' Mod (one of the major attempts at changing the news ticker) erased unwanted messages by merely changing the formatting by making them comments, and in the case of the fluff, appear to have deleted most of them.

I have been wanting to a make historical-period-specific fluff text mod, but don't know much about Lua, etc., and so have a couple of questions now:

1.) Do the strings have to be localized (i.e reference the LTEXT in the localization file)? And if not, how would one format it right there in the lua file?
2.) Is there anything that would stop the creation of new triggers? (aside from the need to create an ID I'm not sure the nature of (see in the example above: "ea89ac36")
3.) While I don't know Lua, and if indeed one can add in new messages, it looks like the trigger could be changed as well (e.g. here, to add new messages that reflect the changing population of the city or some other factor, and customize it to suit the needs of smaller or larger places. Is this correct?

  • Like 3

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
Currently: Viewing Forums Index
 

Tis been quite a long time since I poked around in the Lua scripts, but here's what my memory suggests:

1 hour ago, Morgan R said:

1.) Do the strings have to be localized (i.e reference the LTEXT in the localization file)? And if not, how would one format it right there in the lua file?

Yes. That is the best way. As I recall they did originally set it so it could be coded in line, but then changed them to peek in the LTEXT even if coded in line within the advice record.

 

1 hour ago, Morgan R said:

2.) Is there anything that would stop the creation of new triggers? (aside from the need to create an ID I'm not sure the nature of (see in the example above: "ea89ac36")

Nothing at all to stop the creation.

You can have as many as you want providing they use unique IIDs. The CA63E2A3-4A5E8EF6-FFAEC42B Lua entry is a notes file that explains some of it and gives an example or two. (Unrelated, but the CA63E2A3-4A5E8F3F-FFE6C952 is the Automata notes file.)

You will want to modify that particular Lua file entry (CA63E2A3-4A5E8EF6-FFA79144) you show above for fluff because adding new entries in the left hand pane requires the proper hash string conversion-to-name which the dofile command can recognize. (Plus it is better to issue said dofile command elsewhere from Lua system memory level rather than game level like that one is.)

Ofc, you can also edit any of the other advice Lua scripts too if what you are adding fits a different category better.

 

1 hour ago, Morgan R said:

3.) While I don't know Lua, and if indeed one can add in new messages, it looks like the trigger could be changed as well (e.g. here, to add new messages that reflect the changing population of the city or some other factor, and customize it to suit the needs of smaller or larger places. Is this correct?

That is correct. You can write the a.trigger as simple or as complex as you like using greater than, less than, or equal comparisons along with Boolean connections. For variables you can test against in your trigger, look in CA63E2A3-4A5E8EF6-FF048A3E. Variables in many of the tables can be the subject of your comparison such as those in game_events, game_trends, tuning_constants, and others.

  • Like 3
  • Thanks 1

Chance favors the prepared mind. ― Louis Pasteur  
Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

Are you new here? Check out the Introduction and Guide to Simtropolis.

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Thanks everyone! I'll try experimenting when I have some downtime. 

     

    • Like 2

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections