Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Dualnames

#201
AGS Games in Production / Re: The Curfew
Fri 12/04/2019 05:48:45
I'd fix the mouse cursor graphic, aside from that it looks really good!
#202
AGS Games in Production / Re: Strangeland
Fri 12/04/2019 00:12:26
INSTEAD OF COMING HERE, JSH, AND DROOLING, how about u finish whispers of the machine! Jokes aside, I'm very hyped for Whispers! Release date is closing in <3

Thank you all for your comments!
#203
AGS Games in Production / Re: Collateral Jelly
Wed 10/04/2019 17:13:43
Ghost, no matter what, no matter how, not to make you feel pressured, but know that I love you and believe in you alone enough for the entire universe. <3
#204
I don't mind <3
#205
These look really good, Kyriako!! I'm not finding any issue with them to be quite honest!
#206
AGS Games in Production / Re: Strangeland
Wed 10/04/2019 06:41:02
Meanwhile, since I last posted here, an update.

-No more shall the game be bound by ags default savestates, I have went through the amazing trouble to code my own (not transferable to a plugin or module), so yay!!

Here's a visual effect for your eyes!
Spoiler
[close]
#207
Regardless, today I've managed to make a very preliminary version of it work, it has to go through testing, but I'm stoked as fuck!
#208
General Discussion / Re: The Joker
Sat 06/04/2019 02:18:22
I've seen the trailer about 20 times <3
#209
AGS Games in Production / Re: SALARYMAN
Fri 05/04/2019 20:37:40
The cahracter is ugly, but his animations are really good and in general the game looks really good even though the initial reaction is not the same!
#210
AGS Games in Production / Re: The Witch House
Fri 05/04/2019 20:33:57
How have i not seen this!! Looks fantastic!!
#211
Code: AGS


char*Token[10000];
int TokenUnUsed[10000];

int usedTokens=0;


void SetGDState(char*value,bool setvalue)
{
	int i=0;
	int id=-1;
	while (i <= usedTokens)
	{
		if (Token[i]!=NULL && strcmp(Token[i], value) == 0)
		{
			id=i;			
			TokenUnUsed[i]=setvalue;
			i=usedTokens+1;
		}
		i++;
	}
	if (id==-1)
	{
		//it doesn't find it while trying to set its state
		//create the thing with said state
		id=usedTokens;		
		TokenUnUsed[id]=setvalue;
		free(Token[id]);
		Token[id]=strdup(value);
		usedTokens++;

	}
}

bool GetGDState(char*value)
{
	int i=0;
	int id=-1;

	while (i <= usedTokens)
	{
		if (Token[i]!=NULL && strcmp(Token[i], value) == 0)
		{
			id=i;			
			i=usedTokens+1;			
		}
		i++;
	}

	if (id==-1)	
	{
		return true;
	}
	else
	{
		return TokenUnUsed[id];
	}
}


void ResetAllGD()
{
	int i=0;	
	while (i <= usedTokens)
	{
		if (Token[i]!=NULL)
		{
			free(Token[i]);
		}
		Token[i]=NULL;		
		TokenUnUsed[i]=true;
		i++;
	}
	usedTokens=0;
}

int GameDoOnceOnly(char*value)
{
	if (GetGDState(value)==true)
	{
		//set state to false
		SetGDState(value,false);
		return true;
	}
	else 
	{
		return false;
	}	
}




Is this proper, I mean this works, fully tested, I'm just wondering if I've fucked up something I can't see. This is a 'replacement' of sorts for the Game.DoOnceOnly, which is also incidentally the last step towards me being able to do my own custom savegames, at least, of the steps I could think of.
#212
I truly had a great time!
#213
How come i didn't think of the score event roflmao, yeah, that's a fantastic idea!
#214
Beginners' Technical Questions / Custom Event
Tue 02/04/2019 02:56:10
I'm trying to remember how this works, I remember vividly a module that had like 2 extra custom events appended to the on_event function.
Sorry for the creating of many topics lately <3

It's important that I'd have that, cause it would help me avoid 'working around' which means a lot of effort and code.
#215
The free part is returning an error cannot convert parameter 1 from const char* to void *
#216
That seems to be working, running tests!
#217
So I have this code in my plugin:

Code: ags

const char*GameDatavalue[40000];

void SaveVariable(const char*value,int id)
{
	GameDatavalue[id]=value;
}

const char* ReadVariable(int id)
{
	if (GameDatavalue[id]==NULL)
	{
		return engine->CreateScriptString("");
	}
	else 
	{
		return engine->CreateScriptString(GameDatavalue[id]);
	}
}


Unfortunately a lot of the times when I'm calling ReadVariable in a simple way, like tryin to read the value, I get weird returns like symbols @ __ and definitely a wrong string. This time I triple checked, and I'm confident the issue lies on the plugin side of things, pasted above. Any thoughts why it faulters?
#218
ROFLMAO WHAT IS WRONG WITH ME, yeah that was it!
#219
Oh, wait let me see if thatis the case!
#220
Code: ags
File*output = File.Open("$SAVEGAMEDIR$/den.dat",eFileWrite);
  int i=25100;
  while (i < 30000)
  {
    if (ReadVariable(i)==null) output.WriteString("");
    else 
    {
      Display("Writing %s",ReadVariable(i));
      output.WriteString(ReadVariable(i));//WriteRawLine(i);
    }
    i++;
  }
  output.Close();


This seems to write the values properly. My ReadVariable goes to an array that stores the text of dialogs
So, when the writing code executes the values in that display function are proper and perfect.


This is the reading part

Code: ags

File*output = File.Open("$SAVEGAMEDIR$/den.dat",eFileRead);
  
  int i=25100;
  if (output!= null)
  {
    while (i<30000) 
    {
      Display(output.ReadStringBack());
      SaveVariable(output.ReadStringBack(), i);
      i++;
    }
    output.Close();
  }


This should return "Dialog 1 00100" then "Dialog 2 010010"  and so on whereas the 0 and 1 are the state of the options.
What it does is it skips intermissioned Dialogs like instead of going 1,2,3,4,5,6,7,8,9 it goes 1,3,5,7,9, I have no clue as to why.

Even when I replace the readvariables and just write the i counters, it writes 25100,25101,25102 etc till 25109 and read 25100,25102,25104
HELP ME
SMF spam blocked by CleanTalk