Accueil Crush your enemies... and create an EMPIRE!!! Space Empires V -- BUY NOW!!!

Connexion utilisateur

  • Créer un nouveau compte
  • Demander un nouveau mot de passe

Navigation

  • news
    • archive
    • blogs
    • books
    • forums
    • recent posts
    • groups
  • image galleries
  • projects & downloads
  • search
  • create content
  • agrégateur de nouvelles

Rechercher

Qui est en ligne

Il y a actuellement 4 utilisateurs et 167 invités en ligne.

Utilisateurs en ligne

  • mudshark
  • Pham Nuwen
  • crazydog
  • Sanderlee

Languages

  • English English
  • French French

Parcourir les archives

« Juillet 2008  
Lu Ma Me Je Ve Sa Di
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Accueil » news » forums » Support & Feedback » Scenarios & Mods » SE:V MODs

Random value in research

Image de crimson
Soumis par crimson le Ven, 2007-11-02 13:49 SE:V MODs

Hi, can a random value be use in Components.txt under Requirement Formula. Example below:

Requirement 1 Description := Empire must have at least tech level 1 in Light Hull Construction.
Requirement 1 Formula := Get_Empire_Tech_Level("Light Hull Construction") >= random([%Level%],Get_Empire_Tech_Level("Light Hull Construction")+1)

This would allow hit and miss research so players won't be able to depend on research as much. The AI would need to be fix, but I don't think it would be that hard. What do you guys think.

‹ Unnamed Mod, Data Errors GidMod, Status Update... ›
» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.
Image de Captain Kwok
Mod Designer

Re: Random value in research

Soumis par Captain Kwok le Ven, 2007-11-02 14:09

The random value will be subject to change each time the requirements are calculated. I think this occurs during the end turn phase. So the problem might be that 1 turn you'll have that level and other turns you won't.


Space Empires Depot | SE:V Balance Mod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de crimson
Mod Designer

Re: Random value in research

Soumis par crimson le Ven, 2007-11-02 14:59

well it would keep the player guessing even more. Plus you have a min. of 50% chance,after level 1, of getting the comp. And that chance only increase each level the tech goes up. ex:

tech >= random(lvl,tech+1)
--------alway fail---------
0 >= random(1,1) 0%
1 >= random(1,2) 50%
2 >= random(1,3) 66%
3 >= random(1,4) 75% Level:1
--------never fail---------
0 >= random(1,1) 0%
1 >= random(1,2) 50%
2 >= random(2,3) 50%
3 >= random(3,4) 50% Level:3

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Captain Kwok
Mod Designer

Re: Random value in research

Soumis par Captain Kwok le Ven, 2007-11-02 17:55

Not really... it could lead to players not being able to build some of their designs on those turns when they "lose" that tech level...


Space Empires Depot | SE:V Balance Mod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de ekolis
Mod Designer

Re: Random value in research

Soumis par ekolis le Sam, 2007-11-03 11:53

Not that I know much about scripting, but is it possible to write an end-turn script which writes out the empire's current tech levels to some location accessible to the data files, so that the data files can do something along these lines:

Custom_Function("My Tech") >= 1 OR 0 >= random(1, 4)

for the requirement, where the custom function is what pulls the saved tech levels back and returns the empire's current tech level in that field?

Somehow I don't think this is possible (the data files don't really allow for much in the way of custom functions; you have to use script for that) - but there is Formulas.txt which at least allows you to define custom functions which don't take parameters... you might have to define a custom function for EACH tech area (!) since you can't pass in the name of the tech area as a parameter... but still there's the problem of retrieving the data from storage...

Alternatively, is there a "give tech levels" function in script which gives free tech levels? Then you might be able to write the end-turn script mentioned above as well as a begin-turn script which gives the tech levels back that were saved by the end-turn script...

P.S. In case you're wondering how to write data to persistent storage without it being modifiable by the player, I know for a fact that there are script functions which save and load data into custom locations in the savegame file Eye-wink

~~~
The power of the ancients is now yours to command. You are truly the Master... of the obvious Sticking out tongue

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de ekolis
Mod Designer

Re: Random value in research

Soumis par ekolis le Sam, 2007-11-03 12:15

Well, there is a function called Sys_Change_Empire_Tech_Area_Research_Accomplished_Amount, which increments or decrements a player's research into a tech area by some specific number of research points. The problem is, I slightly misunderstood what was needed - not granting new tech *levels* but granting tech *items* such as components and facilities. So to do what you want, you'd need a new tech area for each component, facility, etc. - and ideally those areas should be somehow unresearchable by a player, yet researchable by using this function. I don't know if giving the areas impossible prerequisites (such as "false" or "get_empire_tech_level("ship construction") >= 999 or "empire_has_racial_trait("no such trait")") would work, or if that would prevent the function from working. If that fails though, you just make the component tech areas really expensive so they're not worth researching - see below for how they get filled up!

But in any event, you scrap the "random" thing in the data files, and set up your tech areas for each component (or just one to test if this even works) - say you set up "Depleted Uranium Cannon" tech. Now you set up your script so that every turn, the game checks if you have gained a new level of "Projectile Weapons" since the previous turn, and if so, it adds some random amount to the "Depleted Uranium Cannon" tech research by using the function I mentioned up top.

Now, you remove the prerequisite "Projectile Weapons" from the DUC component, and add in a new prerequisite, based on the "Depleted Uranium Cannon" tech.

Presto, randomized research (ala MOO2) for DUC's! Laughing out loud (Since the DUC research is randomized but still scaled by your level of Projectile Weapons, you never quite know each turn whether you'll reach a new level of DUC's!)

If that doesn't quite make sense, here's how it would work for the player:

Turn 1 - Player: "I put 6K RP into Projectile Weapons."
Processing - Script: "Hmm, 6K into Projectile Weapons? Projectile weapons cost 2K and 4K at levels 1 and 2 respectively so that means we got level 1 and 2 projectile weapons... roll some dice, we got 73K RP applied toward DUC's... DUC's cost 50K at level 1 and 100K at level 2 so that gives us level 1 depleted uranium cannons tech and the associated component, feed that back to the player"
Turn 2 - Log messages: "We have accomplished level 1 and 2 projectile weapons, and level 1 depleted uranium cannons tech - that gives us level 1 depleted uranium cannons component!"

Now you just need to repeat for every other tech... hopefully that's possible in a loop or something Sticking out tongue

~~~
The power of the ancients is now yours to command. You are truly the Master... of the obvious Sticking out tongue

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de ekolis
Mod Designer

Re: Random value in research

Soumis par ekolis le Sam, 2007-11-03 12:19

Actually, I take back my statement on the difficulty of doing this - you only need to duplicate each tech area ONCE, not once for each result it gives! That's because you can still assign formulas in the requirements for the duplicated techs, so you can have WMG's require level 15 of High Energy Weapons while ripper beams require level 1, and just have the duplicate techs be the ones that players research (call them "High Energy Weapons Theory" etc.)

~~~
The power of the ancients is now yours to command. You are truly the Master... of the obvious Sticking out tongue

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Re: Random value in research

Soumis par SuicideJunkie le Sam, 2007-11-03 17:54

I came up with a nifty research scheme early in the beta, but it was not possible to implement back then. It should be now, given the scripting Ekolis is talking about.

It starts out as normal.
Each turn, and for each tech level:
IF (points_remaining / points_reqd < rnd(0,1) * rnd(0,1) )
THEN points_invested = points_reqd
ELSE points_invested = 0.9 * points_invested

Each turn, you will have a chance of your researchers making a breakthrough, and achieving the next tech level. The chance of a breakthrough increases with the amount of research you have put in:
- Having a tech area 10% researched gives you a 1% chance each month of a breakthrough to the next level.
- 50% researched means a 25% chance each month of a breakthrough.

And each month, your invested points decay as old notes gather dust.

Notable Notes:
- This encourages people to spread their research around! The fewer points you have in each project, the more of a benefit you gain from the breakthroughs in terms of free points.
- It also reduces micromanagement of research, since SE4 style sequential research is no longer the best way to play; you can divide up your research and leave it there to cook.
- And even if you cut funding to a project, there will still be researchers looking through things in their spare time, and/or conspiracy theorists investigating why you cut funding so close to success!

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Re: Random value in research

Soumis par Gideon le Sam, 2007-11-03 19:38

SuicideJunkie wrote:
I came up with a nifty research scheme early in the beta, but it was not possible to implement back then. It should be now, given the scripting Ekolis is talking about.

It starts out as normal.
Each turn, and for each tech level:
IF (points_remaining / points_reqd < rnd(0,1) * rnd(0,1) )
THEN points_invested = points_reqd
ELSE points_invested = 0.9 * points_invested

Each turn, you will have a chance of your researchers making a breakthrough, and achieving the next tech level. The chance of a breakthrough increases with the amount of research you have put in:
- Having a tech area 10% researched gives you a 1% chance each month of a breakthrough to the next level.
- 50% researched means a 25% chance each month of a breakthrough.

And each month, your invested points decay as old notes gather dust.

Notable Notes:
- This encourages people to spread their research around! The fewer points you have in each project, the more of a benefit you gain from the breakthroughs in terms of free points.
- It also reduces micromanagement of research, since SE4 style sequential research is no longer the best way to play; you can divide up your research and leave it there to cook.
- And even if you cut funding to a project, there will still be researchers looking through things in their spare time, and/or conspiracy theorists investigating why you cut funding so close to success!

This is a very interesting idea. It even opens the door for another racial ability, one that increases the odds of a breakthrough.

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de ekolis
Mod Designer

Re: Random value in research

Soumis par ekolis le Sam, 2007-11-03 21:00

I have implemented SJ's research scheme in a simple mod:
http://wiki.spaceempires.net/index.php/Random_Research_Mod

Feel free to borrow from the included event script! Laughing out loud

~~~
The power of the ancients is now yours to command. You are truly the Master... of the obvious Sticking out tongue

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Re: Random value in research

Soumis par evilhamburger le Sam, 2007-12-08 06:24

Problem, if I put random as a value, firstly I doubt the game would accept it, secondly, the BIGGER problem is that if it did accept it, how says it would be between 1 and 10. it might be 126 which would meen you cant research it. or even infinity value.

This would be kinda cool but I doubt it would work.

» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.

Now on STEAM

Now on STEAM!Space Empires V via STEAMSpace Empires IV via STEAMSTEAM online by Valve Corporation

Contenu populaire

Aujourd'hui :

  • Research By Percentage SUCKS
  • Space Empires V 1.74
  • Governmet mod/patch/addon
  • Tweaking the planet art without going all the way to FQM
  • Shipsets, Empires, and dead AIs

Depuis toujours :

  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • Space Empires V
  • Gritty Galaxy Fleet Clash
  • Damn Dirty Bugs/Annoyances
  • Space Empires V: General Thoughts, Observations, and Suggestions

Dernier accès :

  • [1.58] Found some damage calculation bugs
  • Ship Building
  • This is a significant issue unless this is as intended
  • Do I have to select ShipSet, RacePic, FlagPic once empire file uploaded to PBW
  • It would be nice to be able to see which facilities are already on-planet and in-system while in the build queue
(c) Strategy First, Inc. All rights reserved.