What I want to do is to create a small ranking system. In example, I have got a challenge mission for my game, similar to Hitman 2, on which the player needs to perform at least 10 headshots to complete this mission.
So if the player performs 10 headshots, he completes the mission, but earns rank C. If he performs more than 10 headshots and less than 15, earns rank B. And if performs more than 15 headshots, earns Rank A.
I already got the ranking system working, done entirely in kismet, but I used some unrealscripting on the enemies pawn classes to detect headshot using HitBone function, and to save a boolean variable (IsHeadShot), an then on kismet it reads the value of this boolean variable and increments another kismet variable (HeadShotCounter) to count the number of headshots, so after all the enemies are killed (i used an ObjectList to detect it), there is another kismet sequence which checks the number of headshots performed, and then triggers a flash movie (icon) for each ranking (A,B,C). I just wanted to “save” this ranking information for each map.
My initial idea was to create for each map 4 Preview images (the original map image + 3 images for the rankings A,B, C), then according to the earned ranking for each map, the image would change. So if player got on Map 1 ranking A, always whenever he plays the game, and opens the map selection list, he would see the map image with kinda badget over it (RankA, RankB or RankC).
I have tested this Script:
class TestConfig extends Actor
var config int X;
But then, what I got was this, on my UDKGame.ini
“AnaIrhabi” here is my custom gametype name.
As I told before, I would need to access this section of the ini file
This is close to what I need, as for saving the Items it uses the perobjectconfig
class SapituItem extends UTUIResourceDataProvider perobjectconfig;
It declares here the config variables, as they appear on the ini files:
* The name of this item to show ingame.
var config string DisplayName;
* The description of the item
var config string Description;
* Name of the texture to use for the icon
var config string icon;
However, the only problem, is that on the tutorial, it says:
"SapituItems are declared by hand. At runtime the should never change. To declare an item simply create a configuration file. And add an entry like this:
You may already be aware of this, but when you save config values from Unrealscript, it will not update those in DefaultSomeFile.ini, but rather in UDKSomeFile.ini.
When you first boot the game, it will generate the UDK*.ini file from the Default*.ini files.
If you manually edit Default*.ini, it will re-generate the UDK*.ini file.
If you want to use (and save) config values in unrealscript classes, you need to setup your class like this:
class MyClass extends SomeOtherClass
In this example, the .ini file would be called DefaultMyIniFileName.ini
Then any values you want to draw from the ini file, you define like this in class:
var config float SomeFloatVar;
Changing the var (and having thay var updated in the .ini file), you simply do like this:
function ChangeMyVar(float newVal)
However… I don’t think this is the best way to do what you need. Config vars are really meant for configuring your game setup, not for saving game state. Using them in the way you are describing will likely cause needless complexity if you want to save states across multiple maps, play-throughs, characters etc.
I would advise instead creating a class to manage these various gameplay stats, and then use class’Engine’.static.BasicSaveObject() and class’Engine’.static.BasicLoadObject() to save/load the class data to a local file. Then you can also expand on this by using JsonObject to serialize and nest other classes data into the same data.
exec function SetImageMarkupByMapName(String InMapName, string newPreviewImageMarkup)
local int i;
local array<UDKUIResourceDataProvider> ProviderList;
local array<UTUIDataProvider_MapInfo> LocalMapList;
`log("SetImageMarkupByMapName(" @ InMapName @ ")");
// Get a list of all available maps.
for (i = 0; i < ProviderList.Length; i++)
// Find the appropriate map, retrieve its image markup.
for (i = 0; i < LocalMapList.Length; i++)
// Map names from Provider do not match capitalization in .INI files.
if (Locs(LocalMapList*.MapName) == Locs(InMapName))
`log("SetImageMarkupByMapName SET(" @ InMapName @ ")");
LocalMapList*.PreviewImageMarkup = newPreviewImageMarkup;
It works perfectly, but I wont use it, because on consoles it does not work. By calling this exec function on my kismet sequence, I can manually change the map image (it changes the ini files). However, as for consoles, the ini files get cooked inside the *.XXX files, and you can’t save this cooked files in run time.
I was able to port UDK Engine May 2011 and make it run on PS3 and Xbox360. That’s a well known project, it stayed a long time online, from since 2015. But then EPIC Games got aware of this, and contacted me, explaining that I must not distribute my modified version of UDK Engine, as it goes against their EULA, however, they were very kind to me, allowing me to officially use my custom UDK Engine for developing and distributing my games.
I signed a standard Unreal Engine Commercial License, and now I am using my custom version of UDK Engine to develop this game for PC, PS3 and Xbox360:
I will release a demo until this weekend, and would like to receive some feedback from you all here on UDK Forums.
My game is getting a very good visibility arround the web, thanks to that project (UDK for Consoles), I became well known especially on Playstation Homebrew Community, made many friends there, I published about my game on thousands of forums, also thousands banned me because the political content of my game, but many allowed me to promote my game there, and even are helping me to promote my game.
I am very active on twitter, and made friendship with some important people of game press, here on Brazil, like IGN Brazil! They liked the concept of my game, and told me they will make a review for my game.
My game even won the first place on its category (3rd person shooter), on the 100 Best Upcoming Indie Games of 2019 in IndieDB website.
So I am very happy, however, I need to polish this demo, so the game will live up to people expectations.
[USER=“287012”]NIDAL NIJM GAMES[/USER] Ah I see. Those are last generation consoles though (about to be 2 generations behind), so it’s hard to justify the development effort in those ports against the potential sales on those platforms.
I understand you bro, but I have done it more for fun and for a personal achievement, I always desired to make a PS3 Game. About my game, It will be a PC Game, and the consoles version are kinda extra stuff, just for fun (also because I have many friends who want to play my game on their PS3).
About the save system, I did use the Kismet Save System and it is working like a charm on PC and Xbox360. As for PS3, I need to adjust somethings on the game executable to add write permissions, as for PS3 homebrew games, they need a specific flag on the EBOOT.BIN (game executable) to write data on PS3 HDD.