Galactic Civilization

Downloads
Metaverse
NewsGroup
Community
Purchase
Galactic Forum
Strategies
Mods
Empires
Do you still think GalCiv 1 is fun even with GalCiv II out?
758 votes
1- Yes
2- No


Boogie's Moding Class #2: Random Events
  Search:   
Go to Bottom         Go to Bottom
by Avatar ScottTykoski - 4/11/2003 12:21:07 PM


// ********************************************
// CREATING YOUR OWN RANDOM EVENTS
// ********************************************

Originally created to be as edit-friendly as possible, the Random Event files can be daunting to someone that wants to create their own. There’re a lot of numbers, with not a lot of feedback as to what those numbers actually do. What I’ll try and do today is step through the EVENT file type and explain each field as painlessly as possible.

//------------------------------------------------------------------------
EVENT UniqueEventName01
//------------------------------------------------------------------------

-this is the header for the event. Give it any name you’d like…as long as it dosent conflict with another event’s name.

Title “Name of Event” //this is another place to name your event, but as of right now it’s unused

Description “A paragraph describing the situation.” // this will be the large paragraph above the options

Image “gfx//your_events.pcx” // file name (from the galciv root) of the image you want to use. Image should be 640x360, 8bit Indexed (256 colors).

EventType 0 // is the event a colonization event or a random event? 0 = colonize, 1 = random


GoodOption, NeutralOption, and EvilOption
// ok, this is where things get…well…messy. The random event that you make will always have random #’s generated for the user. In order to display this, and other information, these entries reference the values “GoodOptStr01”, “GoodOptStr02”, “NeutralOptStr01”, ect. These values tell the game what data to enter in place of the %s placeholders within the text you enter. There are several values that the game will accept….

0 = Display nothing. Use this by default.
1 = Player’s name..uses the value the player typed in at the start of the game. (ex> Alan Bradly)
2 = Player’s empire name. Name of the human race (ex. Terrans)
3 = Name of Player’s ships that triggered the event. Right now only works with colonization events…will display the name of the colony ship.
7 = Name of the planet.
8 = Name of the star system.
9 = Random value of the EVIL option.
10 = Random value of the NEUTRAL option.
11 = Random value of the GOOD option.

Example…

GoodOption "%s is here for all forms of life to share. Let us all live in harmony, no matter what the cost. (%s%% Planet Quality bonus)"
GoodOptStr01 7
GoodOptStr02 11

Using the “GoodOptStr” values, GalCiv will display the name of the planet in place of the first %s, and display the percentage value of the good option in place of the second %s. Also, you’ll see two consecutive %%’s. That’s to indicate where you want a % symbol to appear. Just a small quirk

The above method of inserting game-specific text into paragraphs is as well used with the Description field. Values for “DescStr01” through “DescStr04” indicate any text you want to appear in the description in place of %s.


GoodAttribute, NeutralAttribute, and EvilAttribute
Indicates what aspect of the game you want to change, based on whether it’s a random event or a colonize event. Colonization Event’s will alter aspects of that planet. Random Events alter player abilities (global change). The following list will explain the different options:

// Colonization Options – bonuses on a per-planet basis
0 – changes nothing
1 – max population growth bonus
2 – morale bonus
3 – social production bonus
4 – planet quality bonus
5 – economic bonus
6 – not used
7 – star influence bonus
8 – defense bonus
9 – research bonus
10 – starship quality bonus

// Random Event Options – these up the players ability
100 – economic
101 – ship weapons
102 - ship defense
103 – ship speed
104 - morale
105 – population growth
106 – social production
107 – military production
108 - research
109 - incluence
110 – trace
111 - diplomacy
112 – ship hit points
113 – ship repair
114 - sensors
115 - espionage
116 - soldiering
117 – interest rates
118 – planet quality
119 – number of trade routes
122 – ship range
123 – luck
124 - courage
125 - creativity
126 - government
127 – loyalty

GoodValue, NeutralValue, EvilValue

This is that value that is applied to the corresponding attribute. It will be randomized so it’s not the same number all the time.

MoralityWeight 1 through 5 // where 1 is a less morally defining situation, and 5 is a major issue that will easily change the way others perceive the player

Probability 1-100 // likelihood of the event occurring

DescStr01 through EvilOptStr02 were all discussed in the above area dealing with the Description and Option text fields.

ENDEVENT // used to indicate the end of the event.


Well, that’s about it. There’s a lot going on within these files, but finely crafted random events can add fun and variety to GalCiv. As always, I’ll be happy to answer any questions on the above documentation. Have fun!

ScottT
GC Development Team


        
#1  by Veteran RustyBlade - 4/11/2003 1:08:57 PM

Scott perhaps you could plop in a complete example of the above senerio? Thanks.



         Posted via Stardock Central
#2  by Citizen Kakupacal - 4/11/2003 2:24:07 PM

Thanks very much for the info!



       Posted via Stardock Central
#3  by Veteran russellmz2 - 4/11/2003 3:47:57 PM

rustyblade,

if you look in a .event file you can see an example right?

            
#4  by Citizen Malleus - 4/11/2003 4:32:00 PM

What is 110, trace?

Thank you for the guide. I intend to get cracking on my .events soon!

M

         
#5  by Citizen PriestOfDiscord - 4/11/2003 6:07:00 PM

Yes, what does trace or government do?
Thanks a lot for the info!

          
#6  by Avatar ScottTykoski - 4/11/2003 10:00:56 PM

Sorry.

110 = "Trade", meening your merchants will be a BC bonus when negotiating a trade route.
126 = "Government" allowing you to have more persuasive power over your senate ("harder to lose control").

I'm happy to post this info. Any suggestions on what I should document next?

        
#7  by Veteran CaptainBizarre - 4/11/2003 11:50:30 PM

Scott,

Is there a default number for the Colonization Options bonuses? (5%, 10%?)
Could you give us similar details for the Random Event options? (Lets you do A. Bonus of X%.)

End transmission.



                       Posted via Stardock Central
#8  by Veteran russellmz2 - 4/12/2003 1:43:57 AM

hey, will this work? i haven't seen it yet in a gmae i was playing.


//-------------------------------------------------------
EVENT EavesdroppingShip
//-------------------------------------------------------
Title "Captured Electro-magnetic Countermeasures Ship"
Description "During an eavesdropping mission a minor power's Electro-magnetic Countermeasures ship collided with one of our fighters in neutral space. The fault lies in our pilot's negligence, who was killed. The eavesdropper was forced to make an emergency stop at one of our orbital docks after its lifesupport failed. \n \n What should we do with the ship and crew?"
Image "Gfx\\DamagedECMShip.pcx"
EventType 1

GoodOption "The crew has no doubt gone through a lot and the fault lies with us. Let us apologize, send them to their homes, and return the ship to its rightful owners. (%s%% morale)"
NeutralOption "Send the crew back. Have our techs examine the craft before we return it...in its component parts. (+%s%% espionage)"
EvilOption "Nothing like a free ship, right? Just like the old days! Make sure you question the crew. Convince them that it is in their best interests to stay here as our new guests. Where's my cattleprod? (+%s%% research)"

GoodAttribute 104
NeutralAttribute 115
EvilAttribute 108

GoodValue -2
NeutralValue 5
EvilValue 5

GoodPopChange 0
NeutralPopChange 0
EvilPopChange 0

MoralityWeight 4
Probability 80

DescStr01 0
DescStr02 0
DescStr03 0
DescStr04 0

GoodOptStr01 9
GoodOptStr02 0

NeutralOptStr01 10
NeutralOptStr02 0

EvilOptStr01 11
EvilOptStr02 0

ENDEVENT


            
#9  by Citizen PriestOfDiscord - 4/12/2003 2:21:53 AM

Thanks again, this should be useful for a lot of people.

          
#10  by Citizen georget - 4/12/2003 7:45:04 PM

Boogiebac, I just wanted to say thank-you for this information. I would've posted the 'thank-you' sooner, but I was too busy trying my hand at making a few events of my own. This info has been extremely helpful to me, and I'm sure, many other folks out there. Thanks again!

-GeorgeT



        Posted via Stardock Central
#11  by Diplomat HawaiiFive-O - 4/13/2003 4:31:41 AM

russellmz2: Your event has 2 problems that I can see. First, in all the files I've looked at, Probability is ALWAYS 100. This feature might not be fully implemented, so I'd take it up to 100 from 80. Secondly, you have the GoodOptStr01 and EvilOptStr01 values reversed. Evil comes first, so it is 9, Good comes third, so it should be 11.

BoogieBac: A few questions.
First, as noted above, Probability is always 100 in the files, so perhaps this feature is not fully implemented?
Secondly, you note above that Colonization Options 8 is Defense Bonus, but looking at the files it looks like 8 is Research Bonus (not 9). So what is 9? OR, maybe all those events where you think you are affecting Research you are actually affecting Defense?
Thirdly, according to your notes, Morality Weight tops out at 5. But in BonusEvents there are several events("MoNatives","PrecursorShip",etc.) where Morality Weight > 5. Is your notes or the events in error? I suspect the events, as I was pretty sure that these events weren't affecting my morality in my last game.

To all: On a lark I started putting together a little proggy to edit events. I love events and can't have enough in the game. I thought if I made it even easier for people they'd might make even more events for me. After about 6 hours, here's where I'm at.
http://www.ctuit.com/bill/galciveventwriter.jpg Link
At this point, it'll read in all the events. The "Delete" button deletes. "Add New" and "Write To File" are still to be written. Is there any interest in me finishing this up? I wrote it in VB6. If no one is that interested I'll shelve it.

I'm going to bed, I'll check back in the morning.

                    
#12  by Citizen Phaedyme - 4/13/2003 6:06:47 AM

That looks rather nice.

Looking forward to seeing it in action. Also wondering if you'd expand it to do UP Issues, techs, ships, anomalies...anyway.



                 Posted via Stardock Central
#13  by Citizen StarDevilThrull - 4/13/2003 9:13:42 AM

HawaiiFive-O that is very cool! It will take a lot of tedious thought out of writing events (which string goes where). I for one would definately like to see you finish it!!!

      
#14  by Citizen Malleus - 4/13/2003 11:07:51 AM

Definitely will be the must-have modding tool when you finish it. It looks very good.

Also, I have an issue with the cryogenically-preserved precursor. I just checked the file, and I can't figure out why this is happening:

Last game I played. Got precursor twice.
This current game. Got precursor three tmes!

SHOULD NOT Be popping up more than half the time when I colonize!

M

         
#15  by Veteran russellmz2 - 4/13/2003 1:52:31 PM

thanks HawaiiFive-O!

that program looks too cool.

            
#16  by Veteran RustyBlade - 4/13/2003 2:07:25 PM

Yes please do finish it and if you have the time I too would love to see this explanded to edit all the DATA files. When you have a release canadate please e-mail me. stephen_tacoma_wa@msn.com Email
Super cool. I was hoping someone with the skills would be doing something like this.



         Posted via Stardock Central
#17  by Diplomat HawaiiFive-O - 4/13/2003 2:20:10 PM

OK, I'm working on it some more today. I've moved the Events editing screen onto it's own form, preparing for *possibly* adding editing features for some of the other files (no promises, I've got a lot of work commitments but programming little projects like this helps me to decompress- I know I'm weird, I like to take a break from programming by programming... ).

Working on data validation and saving now. Added a new "Review" function that will show you how it should print in game. Have to add some documentation and error-trapping. And I also want to drop it onto some of the test machines at work to make sure nothing blows up.

Once again, no promises, but it is conceivable I could have a "code still bloody, install only if you have the guts" version tonight, maybe Monday.

Thanks for the kind words. And if you have any suggestions (other than "Make it work for all the files" ) post them here.

                    
#18  by Citizen Bill Ko - 4/15/2003 10:31:51 AM

bump - sorry, i don't know how to print this (other than printscreen), so I need this to be current. I'm working on an app to do the same thing(s) that HawaiiFive-0 is working on, mostly because working on stuff like this is fun, but also to keep up with my programming skills. I don't really plan on making it public, but if anyone is interested in seeing what I have (which, at the moment, is nothing) just let me know.

Bill



                         Posted via Stardock Central
#19  by Citizen Bill Ko - 4/15/2003 10:33:42 AM

BTW - what was the FIRST tutorial? I missed that one...

Thanks!

Bill



                         Posted via Stardock Central
#20  by Citizen Bill Ko - 4/15/2003 11:02:30 AM

I won't bump this again... I just overcame my stupidity and cut n pasted the tutorial and then printed it.

Bill



                         Posted via Stardock Central
#21  by Veteran Duglis - 4/15/2003 5:53:17 PM

Hawaii..that looks superb!

I love the events too!

doug

                    
#22  by Veteran Duglis - 4/16/2003 1:06:38 PM

Hawaii..how's your program going?

D

                    
#23  by Diplomat HawaiiFive-O - 4/16/2003 1:19:27 PM

It's got it's own thread now, check out the thread "GalCiv Writer" started by me.

A beta is out if you want to give it a whirl. Read the thread for details...

                    
#24  by Avatar ScottTykoski - 4/16/2003 10:21:30 PM

*Edit - Hawaii caught me on this one...MoralityWeight is 1 - 5 where 1 == a major moral event and 5 == a non-important event. Numbers can be over 5, but, as it increases, the likelyhood if it having an impact on your morality standings decreases.

        
<<   (1) 2   ->   >> 
   Page 1 of 2   

Go to Top    Go Back to Message Board    Go to Top
To be able to post something you have to become a member
Click here!



Copyright 1995-2026 Stardock Corporation. All rights reservered.
Site created by Pixtudio and Stardock, designed by Pixtudio.